From: Eric Mahurin Date: 2005-05-19T21:39:22+09:00 Subject: Re: syntax sugar: treating an object like a method > >> Another note: as far as I remember there are plans to make > () > >> work for > >> lambdas. So currently we have > >> > >>>> f = lambda {|x| x+x} > >> => # > >>>> f[10] > >> => 20 > >>>> f.call 10 > >> => 20 > >> > >> Then we had additionally > >> > >>>> f(10) > >> => 20 > > > > Cool. So, this sounds like the ()/null operator is being > > implemented with procs/lambdas. Now if we could just have > it > > for the rest of the objects. > > It'll probably work as general mapping to #call so it would > work with > everything that has #call. > > Cheers > > robert Thanks Robert. If that is the case, it sounds like I'll get the main thing I wanted - ()/null operator. Anybody know if lambdas will also support blocks anytime soon? It doesn't seem to make sense why I can't do this: f = lambda {|*args,&block|puts(*args);block[]} f[1,2,3] { puts("hi") } or in the 1.9 syntax: f = {|*args,&block|puts(*args);block[]} f(1,2,3) { puts("hi") } I just grabbed 1.9 and none of this new syntax seems to work. Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html