[Pharo-project] Stack should be reimplemented with Array

Igor Stasenko siguctua at gmail.com
Mon Oct 18 16:49:38 EDT 2010


Stephane, i could say more:
- i don't like how LinkedList implemented.

I don't see why it should mimic things like #at: #at:put: at all..
IMO this protocol should be pruned from it, to not provoke uses which
completely do not fit for given data structure.

Removing/inserting into the middle of list is quite ineffective
operation (O(n)),
while inserting at the begginning/end of list is O(1).

Lists are sequenceable.. but sequenceable ~~ indexable. Period.

-- 
Best regards,
Igor Stasenko AKA sig.




More information about the Pharo-dev mailing list