From: Brian Candler Date: 2007-05-31T21:49:49+09:00 Subject: Re: Introducing the "it" keyword On Thu, May 31, 2007 at 09:32:28PM +0900, Jacob Burkhart wrote: > consider the clarity of reading these: > > with(v+1) do |a| > with(x+2) do |b| > return a if a+b < 10 > end > end > > vs. > > with:a(v+1) do > with:b(x+2) do > return a if a+b < 10 > end > end How about also comparing it with: (1) with(v+1, x+2) { |a, b| return a if a+b < 10 } (2) a = v+1 # or: a, b = v+1, x+2 b = x+2 # return a if a+b < 10 (3) local { a = v+1 # or: a, b = v+1, x+2 b = x+2 # return a if a+b < 10 } All these can be implemented without any language changes. Now, if you could assign default parameters in blocks, you'd have another option: (4) let { |a=v+1, b=x+2| return a if a+b < 10 } Having default values for block arguments would be a boon for other reasons, including being able to rationalise some of the differences between the various flavours of blocks, procs and methods. The main difficultly seems to be the ambiguity of '|' as an operator or the end of a parameter list. Regards, Brian.