Well, I'm just arguing that in Ruby, the simple convention that negative indices start from left to right map to a zoo of different methods in Smalltalk. You didn't comment on: ('hello' from: 2 toFromEnd: 2) should = 'ell' Would that find your blessing? niko On Mon, Jun 7, 2010 at 6:59 PM, Ramon Leon <ramon.leon@allresnet.com> wrote:
On 6/7/2010 5:03 AM, Lukas Renggli wrote:
Am I the only one who finds the ruby protocol for accessing collections richer at times? In Smalltalk, if ary is an array, how do I get ary without its last element?
anArray allButLast
Or for other amounts, allButLast: x
There's also allButFirst and allButFirst: x. Â A look at the protocol of SequenceableCollection would have revealed this in seconds.
-- Ramon Leon http://onsmalltalk.com
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41 076 235 8683