[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Syntactic sugar for function parameters
- From: "Gavin Kistner" <gavin.kistner@...>
- Date: Wed, 7 Feb 2007 09:02:34 -0700
From: Bret Victor
> Gavin Kistner <gavin.kistner <at> anark.com> writes:
>
> > The terseness of these near-lambdas[1] is one of Ruby's greatest
> > accomplishments, IMO.
>
> Ruby's greatest accomplishment was to copy Smalltalk? ;)
>
> Ruby: obj.foobar { |x| 2*x }
> Smalltalk: obj foobar: [ :x| 2*x ]
Beauty contest aside, if I don't call it one of Ruby's greatest
accomplishments, I'd have to call it a great failing of those languages
that didn't copy it. :) And I'd hate to say that about Lua. So I'll
focus on the "yay for copying" aspect. ;)