From: "David A. Black" Date: 2008-05-12T09:10:16+09:00 Subject: Re: lambda, ->, haskell, and so on Hi -- On Mon, 12 May 2008, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: lambda, ->, haskell, and so on" > on Sun, 11 May 2008 15:14:54 +0900, Evan Phoenix writes: > > |Not to throw the whole thread into a tizzy again, but why again is: > | > | ->(a,b) { } # stabby proc > | > |better than > | > | def(a,b) { } # anonymous def > | > |Seems like there has been continual talk of the positions of ->, but > |none (I may have missed it) on it existing at all (though, I'm quite > |aware of them existing before). > > IIRC, def stands for define, so > > def foo(bar) > ... > end > > reads "define method foo which takes a parameter bar as blah blah". > Anonymous def does not define any method, so its name contains > contradiction in itself. Hmmm... how about "define a function [and bind it, optionally, to a name, which makes it a method] which takes parameter x, etc....". If def[ine] always meant a method, then wouldn't define_method just be define? :-) David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin INTRO TO RAILS June 24-27 London (Skills Matter) See http://www.rubypal.com for details and updates!