From: "David A. Black" Date: 2005-03-20T05:35:23+09:00 Subject: Re: Paul Graham recommends Ruby Hi -- On Sun, 20 Mar 2005, Christian Neukirchen wrote: > Navindra Umanee writes: > >> Christian Neukirchen wrote: >>>> Ruby blocks are just syntactic sugar for a special-case lambda. Ruby >>> >>> Care to elaborate? What's lacking? >> >> Yeah, sorry for being unclear. I was referring to higher-order >> functions i.e. Ruby blocks allow you to pass one anonymous lambda to a >> higher-order function with convenient syntax... for more than that it >> gets less convenient. > > This apparently got better with the anonymous blocks recently imported > in CVS, but I didn't try that yet. It's a restriction by design, > though. I'm not sure anything's new in that CVS feature except: my_lambda = {|| puts "I am a lambda"} where the || (with or without a param list) tells you that it's a lambda rather than a hash. I'm not a fan of this; I prefer using the lambda keyword. David -- David A. Black dblack@wobblini.net