I've completed a new ADT, but have some problems with what to name It to. It is basically a Sequence, see w1.313.telia.com/~u31318241/CommonAPI.pdf for my definition of a Sequence (basically an array where you can do insert and remove).
The suggested names are -ADT.Vector -ADT.Array -ADT.Sequence
I'm personally leaning towards Vector or Sequence because Array could cause name conflicts. The ADT is currently named ArrayAdapter (not a very good name).
I would lean towards Sequence, since Vector sounds like it could be confused with mathematical vectors.
/ Mirar
Previous text:
2003-03-05 10:20: Subject: Name of ADT
I've completed a new ADT, but have some problems with what to name It to. It is basically a Sequence, see w1.313.telia.com/~u31318241/CommonAPI.pdf for my definition of a Sequence (basically an array where you can do insert and remove).
The suggested names are -ADT.Vector -ADT.Array -ADT.Sequence
I'm personally leaning towards Vector or Sequence because Array could cause name conflicts. The ADT is currently named ArrayAdapter (not a very good name).
/ Peta, jo det är jag
No it doesn't. The only argument I have against Sequence is that it may be confusing with a concept and a type both named Sequence. For instance in the description of an algorithm. ... this algorithm takes a Sequence and does ... But that might onthe other hand be a good thing since if you have a type that have every function that the type Sequence have then you know it will work and you don't have to look in the ADT concept documentation. If no one argues I'll go with Sequence then.
/ Peta, jo det är jag
Previous text:
2003-03-05 10:43: Subject: Name of ADT
Does it lack any of the properties of a Sequence, as stipulated by the document?
/ Johan Sundström (folkskådare)
I looked at the pdf, and it's pretty nice stuff.
However, what I personally find lacking about this sort of api is how it forces you to forfeit type checking on the objects you stuff into these Collections. I mean, no way seems to be foreseen to declare (say) a sequence as ADT.Sequence(string|Stdio.File) or something like that.
AFAIK (which is not too say too much) the java collections api suffers from a similar shortcoming, perhaps Pike might be able to improve on that somehow?
Just my 0.02.
/ rjb
Previous text:
2003-03-05 10:20: Subject: Name of ADT
I've completed a new ADT, but have some problems with what to name It to. It is basically a Sequence, see w1.313.telia.com/~u31318241/CommonAPI.pdf for my definition of a Sequence (basically an array where you can do insert and remove).
The suggested names are -ADT.Vector -ADT.Array -ADT.Sequence
I'm personally leaning towards Vector or Sequence because Array could cause name conflicts. The ADT is currently named ArrayAdapter (not a very good name).
/ Peta, jo det är jag
I guess it should be possible to type check objects by passing a program at creation time and then only allow objects that is of that program or subtypes of that program. But I have no idea of how to solve it for primitive datatypes.
/ Peta, jo det är jag
Previous text:
2003-03-05 11:38: Subject: Name of ADT
I looked at the pdf, and it's pretty nice stuff.
However, what I personally find lacking about this sort of api is how it forces you to forfeit type checking on the objects you stuff into these Collections. I mean, no way seems to be foreseen to declare (say) a sequence as ADT.Sequence(string|Stdio.File) or something like that.
AFAIK (which is not too say too much) the java collections api suffers from a similar shortcoming, perhaps Pike might be able to improve on that somehow?
Just my 0.02.
/ rjb
I have ideas, but I forgot how they work...
| > mixed t=typeof(1); | > t; | (1) Result: int(1..1)
:-)
/ Mirar
Previous text:
2003-03-05 15:14: Subject: Name of ADT
I guess it should be possible to type check objects by passing a program at creation time and then only allow objects that is of that program or subtypes of that program. But I have no idea of how to solve it for primitive datatypes.
/ Peta, jo det är jag
ADT.List?
/ Martin Nilsson (har bott i google)
Previous text:
2003-03-05 10:20: Subject: Name of ADT
I've completed a new ADT, but have some problems with what to name It to. It is basically a Sequence, see w1.313.telia.com/~u31318241/CommonAPI.pdf for my definition of a Sequence (basically an array where you can do insert and remove).
The suggested names are -ADT.Vector -ADT.Array -ADT.Sequence
I'm personally leaning towards Vector or Sequence because Array could cause name conflicts. The ADT is currently named ArrayAdapter (not a very good name).
/ Peta, jo det är jag
pike-devel@lists.lysator.liu.se