Dave Thomas wrote:
> ...
> And this is where I have some concerns. Right now, Ruby is fairly
> agnostic about the style you adopt. You can write Ruby as you'd write
> Perl, and you can write Ruby as you'd write Smalltalk. With this
> change, it would be less practical to write the monolithic-style of
> Ruby program. This might be a Good Thing. But at the same time it's
> really the first time that the Ruby language puts that kind of
> constraint on programming style. Do we want Ruby to make it hard to
> write programs in a certain (dubious) style?
> 

I think there is more good than harm.  So many people seem to already
be asking "What's the best/right way to do X in Ruby?". So this would
give some direction (which of course results in excluding other 'ways').

Even then, there is not that much lost. Already, someone writing in a 
monolithic style has to know all local variables used in order to ensure
that unique variables are used inside blocks so they can become block-local.

And besides, if someone *really* needs to control scoping precisely, 
perhaps it is better to use a custom namespace after all? 
For example, see http://ruby-talk.org/12214

Alternatively, such a feature could be made as a built-in hookable prefix.
Just as 'each' is used, there could be a redefinable 'context' or 'scope'
which is automatically used by variables having a particular (new) prefix...
(Now for trying to decide which symbol to use as a prefix, hehe: @@@, ^, @$, etc.)


Guy N. Hurst

-- 
HurstLinks Web Development    http://www.hurstlinks.com/
Norfolk, VA  23510            (757)623-9688 FAX 623-0433
PHP/MySQL - Ruby/Perl - HTML/Javascript