From: James Edward Gray II Date: 2005-09-29T02:51:16+09:00 Subject: Re: creating independent lambdas in loops On Sep 28, 2005, at 12:42 PM, Ara.T.Howard wrote: > On Thu, 29 Sep 2005, David A. Black wrote: > > >> See http://www.rubyist.net/~matz/slides/rc2003/mgp00010.html and the >> slides following that one. I think the idea would be: >> >> a = 1 >> method_call {|a| a = 2; b = 3 } >> puts a # 1 >> puts b # 3 >> > > oh gawd - that's horrible : variables exported from method scope to > the global > (or enclosing perhaps?) one. eeks! > > being able to create top level vars from inside methods would, at > least, > introduce a massive garbage collection issue and, at most, > introduce millions > of very hard to track down bugs. > > im__h__o. Yeah, I'm not fond of it either. I believe the goal is to make variable behavior more consistent, but I don't like the "leakage". James Edward Gray II