Since no one else has taken this up, I'll start an initial draft.
=head1 TITLE
Rename the C<local> operator
=head1 VERSION
Maintainer: J. David Blackstone <[EMAIL PROTECTED]>
Date: 4 Aug 2000
Version: 1
Mailing List: [EMAIL PROTECTED]
Number: not yet assigned
=head1 ABSTRACT
The C<local> operator of Perl5 and earlier does not do what it claims
to and should be renamed.
=head1 DESCRIPTION
New Perl programmers are often confused by the behavior of the
C<local> operator, especially since a great deal of old educational
material exists showing the obsolete practice of using C<local> to
create subroutine arguments and local variables.
C<local> does not provide variables that are local to the enclosing
scope. Instead it permits what is known as dynamic assignment, the
ability to temporarily assign a value to a variable such that the
variable's original value will be restored when the current scope is
exited. Relying on this mechanism to provide what most people think
of as local variables (lexical scoping) can sometimes fail.
C<local> is useful in many cases and should be retained but renamed to
reflect its action.
=head1 IMPLEMENTATION
Many replacement names have been proposed for local on the
perl6-language list, and I am sure there are others that were proposed
on p5p in earlier days. My current favorite name is C<dynassign> to
reflect that a variable will undergo dynamic assignment. I am certain
that better alternatives exist and that very few people will like that suggestion.
A list of other proposed replacement names includes (but is not
limited to, since I certainly have forgotten some):
C<pushpop> (to reflect the fact that the variable's old value is
pushed onto a stack and popped off when the scope containing the use
of the operator is exited)
C<dynsave>
C<save>
C<clone> (not a good idea, in my opinion. I think that means making
an exact copy of an object.)
C<temp>
C<savetemp>
C<tempsave>
C<scopetemp>
C<deliver>
C<preserve>
C<saveval>
C<tempval>
C<saverestore>
C<myval>
C<pushval>
C<contain>
C<detach>
C<revalue>
C<let> (I'm not sure this was a proposal)
None of these completely satisfies me, at the moment, and there does
not appear to be any consensus among the group.
=head1 REFERENCES
The perlfunc manpage
=cut
J. David
---------------------------------------------------------------------
On the flip side, we need to be Very Careful not to get our egos
irrevocably tied to our proposals. I have a particular distaste for
the sort of argument that goes, "If I can't have it my way, I'm going
to take all my marbles and go home."
-- Larry Wall