From: Charles Oliver Nutter Date: 2007-07-10T13:35:43+09:00 Subject: Re: Yield should be renamed call_block Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Yield should be renamed call_block" > on Mon, 9 Jul 2007 09:10:23 +0900, Bharat Ruparel writes: > > |I find it fascinating and quite a bit true. However, I have to always > |mentally translate the keyword "yeild" to mean "call_block". > > The "yield" keyword is used for this purpose from the ages of > languages for example in CLU. So if you learn the history and the > culture, you will find less problem. > > I am not going to rename it. But in far future (3.0? maybe), the > keyword will be removed from the language, and you will access blocks > via block arguments of methods. This is similar to how we implement blocks in JRuby. All methods receive a block, but it may be a "null block" that raises when yielded to and returns false for "given?". But there's always some kind of block regardless, and other than the syntactic sugar of yield versus call, it's largely the same code. - Charlie