From: Caleb Clausen Date: 2010-05-28T22:37:37+09:00 Subject: Re: Ruby Core - Lambda function On 5/27/10, Paul A. wrote: > Hi, > > Just a thin post in order to purpose this: > > I think it could be cool to call lambda function just like: ë > > Such as: > > a = 0 > my_while ë { a < 5 } do > puts a > a += 1 > end Honestly, why is this better than: a=0 while a<5 do puts a a+=1 end This way is so much less noisy and more succinct. You could even leave off the do. lambdas should not be used to replace arbitrary expressions. Only where you need them. > I think ë is more human then -> Idunno. It's just some (fairly arbitrary) greek letter. I find the arrow a little more evocative myself. Putting Robert's doubts about encoding issues aside, you can already do this in both 1.8 and 1.9: #encoding: utf-8 alias ë lambda x=ë{ p :foo } x.call #=> :foo In 1.8, you do have to pass -Ku on the command line, tho. I am with Piyush on the question of how you type these things, tho. My keyboard only has ascii on it. I'm putting off adopting unicode until a unicode keyboard is available.