Re: proposed addition to perlvar

[email protected] ("Chas. Owens")
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Wed, Jun 9, 2010 at 11:44, Tom Christiansen <[email protected]> wrote:
> In-Reply-To: Message from "Chas. Owens" <[email protected]>
>   of "Wed, 09 Jun 2010 11:23:02 EDT."
>   <[email protected]>
>
>>> I like what you have below for both, particularly the bit about the
>>> warnings.  Could you please re-submit them in patch format?
>
>> [ SNIP ]
>
>> I moved both variables into a new section named "Deprecated Names"
>> between "Predefined Names" and "Error Indicators".  I also change
>> one of the examples in $# based on concern raised by some of the
>> other emails.
>
> Might we please consider coming up with some less remonstrative synonym
> for "Deprecrated" to be used in cases such as this one here before us?
>
> I ask this for two reasons.  The first is that "deprecated" has on occasion
> been (mis-?)understood by some porters to mean meriting warnings, or slated
> for expurgation, or both.  Lacking clearer understanding, I'd rather not
> see that occur here.
>
> But more importantly, while not at the tip of my fingers, I'm *pretty* sure I
> recall certain operations that would be either more syntactically elaborate or
> even simply impossible without the $#{ EXPR_FOR_ARRAY_NAME_OR_REF } notation.
>
> I did say "pretty" sure, though, so perhaps I may be wrong.  Examples either
> way are welcome.
>
> --tom
>

Crap, this means that the text is not clear enough yet.  $#{
EXPR_FOR_ARRAY_NAME_OR_REF } is not being deprecated, the $# variable
was removed (in 5.10).  I proposed adding an entry for $# because new
users are finding it hard to discover the meaning of $#array from the
documentation (they seem to be tending to look in perlvar, perldsc,
and perllol, but not perldata.  Perhaps changing

C<$#> is also used as sigil, which, when prepended on the name of an
array gives the index of the last element in that array.

to

C<$#> is still allowed to be used as sigil, which, when prepended on
the name of an array gives the index of the last element in that array.

would clear this up?

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.