On Fri, Jan 28, 2011 at 01:00:23PM +0100, Zsbán Ambrus wrote: > 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. > And the operator that started this thread: ~~ $perl -E '$a = "1"; say "1: ", "1 x" ~~ $a; 0 + $a; say "2: ", "1 x" ~~ $a' 1: 2: 1 $ AbigailThread Previous | Thread Next