From: Bulat Ziganshin Date: 2002-10-09T14:06:47+09:00 Subject: Re: block vars (some theory) Hello Mauricio, Tuesday, October 08, 2002, 8:36:26 PM, you wrote: >> B>> a = 1 >> B>> { >> B>> a = 2 # ruby prints warning - outer var used without explicit import MF> This might sound wildly un-scientific, but I very much prefer matz's MF> cautious approach, where features are added carefully and bad style MF> (such as the example you give) is discouraged by the language, we can't do more than printing a warning because another decision will break compatibility. agree? MF> to keeping adding MF> feature after feature to Ruby until it becomes "interpreted Smalltalk + Perl MF> + CLU + Algol + Lisp + C++ + ??" you are named almost all ruby roots, except eiffel :) in this question, we have one unobvious but minimalistic feature. we can keep the language in current state or mark this feature as obsolete and give more structured and explicitly expressed way to do same job. in the second variant my proposition imho is better than using ':=' to declare variable as local or using ':' as prefix to local variable names of course, i prefer to use words in syntax, not cryptic symbols, as you may be prefer -- Best regards, Bulat mailto:bulatz@integ.ru