Nathan Wiger wrote:
>
> > I have retained the title of "Lexical variables made default,"
> > because I still feel that that is the primary purpose of this change
>
> First off, I think this is a great idea in principle. However, I don't
> think it goes nearly far enough in the implementation. I'd like to
> propose something radical.
You've got what I had in version 1 of the RFC (still available from
the archive, earlier today, or if you want, I'll send it to you). I
left it in the alternate implementation at the bottom of the RFC. You
are welcome to submit an expanded alternate section, if you are still
interested after hearing the arguments. (Or, if you feel like you
have a lot of time, you can take over maintenance of the RFC :).
> However, the code is still littered with what I would argue are
> "useless" my()'s that serve as workarounds for a fundamental flaw in the
> langauge: all variables are global by default.
Well, yes, the fact that the language was designed around dynamic
variables is a fundamental flaw. However, what swung me over to my
current view was the fact that not declaring variables (at least for a
script of a certain size and permanence) is also a fatal flaw. The
proposal you made (and that I made before) still does not force
declarations, resulting in a whole new territory which we have never
explored. Some have already pointed out a few interesting scoping
questions. Making strict vars behavior the default gives us all the
benefits of dynamic variables and required declarations with very few
new questions to resolve. Everything is familiar and follows the path
of evolution Perl programming has been traveling in since the
beginning of Perl5.
> Before you write me back and claim heresy, let me explain what I mean.
No, we won't shoot you for heresy. At least, I won't. I've
committed a couple, already. (Some seriously and some hypothetically.)
> I argue we should fundamentally shift this thinking in Perl 6. Let's
> truly have "lexical variables made default".
Well, let's keep talking about it, and I'm sure Larry Wall will give
us a decision that will make everyone happy.
J. David