From: Trans Date: 2005-08-05T21:41:07+09:00 Subject: Re: ruby-dev summary 26468-26661 Jim Freeze wrote: > > > > Don't worry. The block syntax will not be changed. Never. > > > > matz. > > Ok, that's good to hear. So, if a new lambda syntax is created, > it doesn't necessarilly need to work for block? That is, it won't > be an alternate syntax for defining blocks? > > Is there a reason that this notation wouldn't/couldn't work > for defining lambdas? > > f = () { puts 5 } # () always required for a lambda. space doesn't matter > f = (a){ puts a } > f = (x, y=5) { ... } > > And, if used as a block... > > func(a,b) (x=2*2) { ... } > My concern with this is admittedly a matter of wishful thinking, but I would nonetheless like to see ruby with currying one day like this: def f(x,y) x + y end g = f(1) g(2) #=> 3 which means: f(1)(2) #=> 3 Your proposed block notation would make this impossible. T.