From: "Florian Groß" Date: 2005-08-08T18:19:05+09:00 Subject: Re: new block notation (was: Re: ruby-dev summary 26468-26661) Yukihiro Matsumoto wrote: > |Should be okay as long as it isn't used as a method name. The 1.9 () on > |local variables change was undone after all, right? > > Right. But adding a new reserved word makes all programs using that > word as a local variable invalid. I'm really not sure if I see the problem with this. Here's my proposal: * introduce lambda as a semi-keyword * if used as "obj.lambda" it is a method call * if used as "lambda (" or "lambda {" it is a keyword * else it is a local variable reference Where "lambda" can also be replaced with "fun", but I think using lambda actually makes collisions less likely to happen. (Because somebody might have done def fun(a) puts a end; fun() {} instead of self.fun() {}) I think this keeps the risk of incompatibility quite low, but I might be overseeing something. Or is the above proposal too hard to implement?