On Tue, Apr 24, 2001 at 11:42:00AM -0700, Nathan Wiger wrote:
>    Perl 5                        Perl 6
>    ----------------------------- ----------------------------
>    $res = $var + $var2;          $res = $var + $var2;
>    $name = "This" . "that";      $name = "This" + "that";
>    $name = "This" . $that;       $name = "This" + "$that";
>    print "Next is " . $i + 1;    print "Next is " + $i + 1;
>    $me = $name . getpwuid($<);   $me = "$name" + getpwuid($<);   
> 
> That last one is important. Notice that the "" on the $name means that
> the next + becomes a string concat. 

Your fourth example disturbs me.  You change the precedence of the
same operator based on context.  That's just weird.  Do we do that
anywhere else?

Oh, and you need to relax your "Always" a bit.

        "string" + $foo         # string concat
        $foo + "string"         # string concat

Quotes around $foo shouldn't be necessary.

As an aside, I wish we could do something like this with our comparators
too.  (Isn't that one of Damian's RFCs?)  Although I get the feeling
that this will cause more headaches.

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to