From: Austin Ziegler Date: 2005-10-19T12:27:56+09:00 Subject: Re: Anonymous methods, blocks etc. (Cont. 'default block params') On 10/18/05, Eric Mahurin wrote: > --- Austin Ziegler wrote: >> On 10/18/05, Sean O'Halpin wrote: >>> On 10/18/05, Eric Mahurin wrote: >>>> But, I kind of still wish we had a syntax where the variables in a >>>> block/lambda were local (non-closure) by default. >>> Maybe if we say it often enough? ;) >> Doubtful. I think to convince matz, real examples would need to be >> presented (as an RCR!) as to why this is necessary. IANM, but IMO >> theoretical need and wish ain't sufficient. > With 1.9 being able to specify local variables in the argument list > and if matz does something about closures holding all variables in the > scope, I doubt you'll find the "need". If there are too many issues > (i.e. compatibility problems) with having closures not hold all > variables in the scope, I think having a non-closure block that didn't > have that baggage (excess memory usage) would be compelling. In the > majority of cases I use blocks, I don't need them to be closures. As I said earlier, though, most of the blocks (I'd say 60%) that I use are closures. Some of these are because I need a value to come out of the block, but I still use them as closures. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca