From: Martin DeMello Date: 2005-10-02T08:41:45+09:00 Subject: Re: suggested changes for ruby libraries Austin Ziegler wrote: > On 10/1/05, Martin DeMello wrote: > > Austin Ziegler wrote: > > > I do not believe that this necessary. > > > > > > # Equivalent to your ...LAST suggestion > > > "hello".index("lo") + ("lo".size - 1) > > I actually think LAST (though I'd say :last) is a cleaner sulution there > > - it avoids repeating the "lo", and it's definitely a useful use case. > > Well, "lo" wouldn't be what gets repeated. It'd be more like: > > str.index(find) + (find.size - 1) Same thing. It's still asking the user to do something that is more properly the computer's problem (explicitly specifying an algorithm for a common task), and it's repeating a piece of information in the "call". martin