From: Tom Sawyer Date: 2003-02-14T11:16:29+09:00 Subject: Re: Lexical scope and closures On Thursday 13 February 2003 06:44 pm, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Lexical scope and closures" > > on 03/02/13, Tom Sawyer writes: > |since there seems to be two general cases that are competing for > | high-ground, so to speak, i wonder if it would not be more prudent to > | distinguish the two with seperate block deliminators? > > I don't think it's good idea, because it kinda hard to remember which > is which. Besides, block delimiters already have precedence > difference, I believe adding two independent roles to a single syntax > construct is bad. > > matz. i understand, but perhaps too bad, as i think it might be the easiest way to satisfy both camps. aside, i am curious about the precedence though, as i have never had the need to pay attention to it. is it a common need? is there no other simple way to designate the precedence one might need in such a situtation? on the other hand we could appraoch it with a simple variation: arr.each do local |x| r = x + 1; puts r end or, perhaps better, arr.each local do |x| r = x + 1; puts r end in either case r would be local to the block. -- tom sawyer, aka transami transami@transami.net