[Q] Why removeLast and removeFirst is implemented into OrderedCollection ?

Stuart Herring st-lists at stuartherring.com
Wed Jan 17 10:34:01 UTC 2007


On 1/17/07, Edgar J. De Cleene <edgardec2001 at yahoo.com> wrote:
> Why removeLast and removeFirst is implemented into OrderedCollection ?
> It's not wiser have it into Collection so this way is more useful ?
>
> Edgar
>
Probably because they don't make any sense unless you're dealing with
an OrderedCollection
How do you know what "first" and "last" are unless there is some sort of order?

Regards,
Stuart.



More information about the Squeak-dev mailing list