From: "ara.t.howard" Date: 2007-07-11T07:36:34+09:00 Subject: Re: Yield should be renamed call_block On Jul 10, 2007, at 3:33 PM, dblack@wobblini.net wrote: >> Since I am not a English speeker and I usually dont use that >> particlar >> word, I feel like "yield" as rather like a symbol vaguly related to >> passing valu to the blok. > > Vagueness would be OK, maybe, but the problem is bigger than that: > it's that "block.yield" just doesn't express what's happening. i'm with matz on this one block.yield reads, to me, simple as 'doing my own thing...' block.yield 'control to you' or accum << block.yield it's especially easy if you happen to think of blocks as a specialized form of co-routinues, which i happen to. i have always disliked block.call precisely because you are NOT doing that. calling a function/method whatever implies a call stack and clean environment. with blocks we actually invoke/yield to them in the particular way that makes them useful - which is to say that they execute within the closure in which they were defined. in general i think it's highly damaging to align the terminology of methods and blocks, since the two operation in entirely different ways wrst closures and people generally have a very hard time with the concept of a real closure and all it's implications. 2cts. regards. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama