On Thu, 7 Jun 2001, Dave Thomas wrote:
> matz / zetabits.com (Yukihiro Matsumoto) writes:
> > Non shadowing, flat local variable scoping, that it tries to emulate
> > is, in my opinion, not dirty at all.  The dirty part lies in
> > flatness depending on context, to achieve compatibility.

The chief cause of problems is solutions.  Especially solutions to
problems that don't exist in the first place. I haven't seen any good
reasons to change the way things are right now.

> Matz's approach, if for no other reason than the current scheme of
> having to assign to a variable outside a block if you want to export
> that variable from the block is ugly.

See [ruby-talk:5655] about ugly things and being lazy. In case you wonder,
that post is not in favour of any particular feature, but a post against
bad arguments.

Besides, can you tell me what is the value of a variable exported from a
block that's never executed? say you have a #each that is executed zero
times...

> You can write Ruby as you'd write Perl, and you can write Ruby as you'd
> write Smalltalk. 

Just like Ben, I write Perl in a style quite indistinguishable from
SmallTalk and Ruby.

> 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? 

This is a non-issue. You just shouldn't take into account how much you can
alienate bad programmers just for being bad. What you should take into
account is that they won't feel alienated, and that you'll end up
alienating yourself by maintaining such code.

Now this is for *your* definition of bad. I write such "bad" code, I
also write code that you'd consider "good", and I also write code which 
generates new methods and classes by itself.

Whatever. I don't see the point of changing scoping of any kind of blocks
in Ruby, be that {...} blocks, if...then...end, blocks; and I don't see
the point of adding a new kind of "more local" blocks. I think there are
much better things to do.

matju