[Guido van Rossum]
> I was sad because Perl seemed to use dynamic scoping when you declare a
> local variable. Tim has since explained that Perl's local is in fact
> ancient. I'm also sad that Perl doesn't default to locals, but that's
> not my problem.
Agreed.
I've been using Perl since Perl 1, all the way to Perl 5. When the `local()'
declaration appeared, probably around Perl 2 or Perl 3 (I do not remember), I
started using it everywhere in an effort of protecting each procedure against
each other. It was also a convenient way to give names to formal arguments,
through "local(name1, name2, ...) = @_" as the first statement in a `sub'.
When "my(LIST)" appeared, one or two major releases later, I progressively
converted all my programs to use it, as it is more in the spirit of what
I wanted. The overall impression that was left to me is that a lot of
declarations are needed, anyway, if you consistently aim clean Perl scripts.
So, there is now an "our(...)" declaration in Perl? Hopefully, it will
not miss me much! :-) And who remembers the "own" specifier of Algol-60? :-)
--
François Pinard http://www.iro.umontreal.ca/~pinard