From: John Feezell Date: 2003-04-27T00:10:07+09:00 Subject: Re: block.call vs. yield Here are a few ideas about names. They maybe all wrong since I may have missed the point entirely. (I'm very new at Ruby.) If that is the case, just cast them out. blk.take blk.accept blk.acquire blk.adopt blk.assume blk.borrow blk.claim blk.demand blk.engage blk.lease JF On Sat, 26 Apr 2003 23:26:14 +0900, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: block.call vs. yield" > on 03/04/26, dblack@superlink.net writes: > > |In a 'yield', the block is being yielded *to* -- it is not, itself, > |yielding control. Therefore, what you'd really need, to describe a > |yield in terms of the block as a receiver, would be something like: > | > | blk.be_yielded_to > | > |which I'm not advocating, of course; it's just that > | > | blk.yield > | > |suggests that the block is performing an action described as > |'yield'ing, which I don't think it is. > | > |Also, the use of 'yield' as shorthand for 'call with certain > |semantics' (if I'm understanding that correctly) seems very obscure > |to me. This would be very hard to explain to someone learning Ruby > |("The block isn't actually yielding control; the method is called > |'yield' because elsewhere in the language there's something called > |'yield' that has the same calling semantics...."). > > Hmm, understandable. It's not obscure for me at all though. > Actually, as a Japanese, I don't use the word "yield" for any other > purpose, so that my feeling is far different from yours. > > Anyway, what is your opinion to make them better? > > Naming is the key of problem solving. If you choose good name, you > will succeed. > > matz. > > > --