develooper Front page | perl.perl5.porters | Postings from January 2011

Re: Changing variable to numeric without assignment (was: Using smart matching)

Thread Previous | Thread Next
From:
Zsbán Ambrus
Date:
January 28, 2011 04:00
Subject:
Re: Changing variable to numeric without assignment (was: Using smart matching)
Message ID:
AANLkTin6vPSSMfd9E2aiybNd9g3k7BCkr+5MhUw6T2E5@mail.gmail.com
On Fri, Jan 28, 2011 at 12:59 AM, Jan Dubois <jand@activestate.com> wrote:
> I would agree with this (caching converted representations should not
> be detectable at the language level).  Unfortunately some operations
> are *documented* to behave otherwise:
>
> |       The auto-increment operato
>
> (From perlop.pod; note the phrase "used in a numeric context")
>
> Personally I consider these design mistakes, but I also don't think we
> can undo them anymore either.  Just some of the warts we have to live
> with.

Can we at least collect a list of operations that care here on the
mailing list, for reference?  The ones I know about are the increment
operator (++), the range operator (.. ...), and the bitwise operators
(& | ^) which all care about whether the scalar has been used as a
number.

Ambrus

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About