lua-users home
lua-l archive

RE: Syntactic sugar for function parameters

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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. ;)

AltStyle によって変換されたページ (->オリジナル) /