On Mon, Jun 7, 2010 at 10:29 PM, Ramon Leon <ramon.leon@allresnet.com> wrote:
 Ruby seems to have a style where you can send just about anything to a method and it tries to figure out what to do based on the type of the arg, they like magic and the smaller API; Smalltalk tends to just have a dozen different but similarly named methods that let you accomplish the same thing.
I like that analysis.
 so yes I like...
('hello' from: 2 toFromEnd: 2) should = 'ell'
:)
I really don't want to learn 10 different ways to use #at:, I'd rather see 10 similarly named methods each doing it one way that look like they're all variations of a theme.
That's a valid stand point to take. I guess, at some point you just need to choose what your use cases are / what your audience is. You can get all the positions of c that differ from a, in Matlab: c(a!=c). In smalltalk, this could be something like: c at: (a differencesVectorWith: c). Cheers, Niko -- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41 076 235 8683