On Thu, Oct 04, 2001 at 11:17:38AM -0400, John Siracusa wrote:
> Hmmm...does anyone else remember when the suggestion that '.' continue to be
> used as the concat operator in Perl 6 was shouted down because it would
> require space on either side of it?  It seems to me that we've come full
> circle with Mr. '_' here... :)
Not quite.  With ' . ' as concatenation, things would be much more confusing:

        $a . $b         # stringifies $a and $b and concatenates them
        $a.$b           # treats $b as a method name and invokes it on $a

Urk!  With the underscore, you have this instead:

        $a _ $b         # stringifies $a and $b and concatenates them
        $a_$b           # syntax error!  (at least most of the time)

I'd say that's definitely an improvement.  Even in some context where
adjacent terms were allowed (though I can't think of one outside double-quotish
interpolation at the moment) $a_$b should result in an error about
$a_ being undeclared - if you use strict.  You do use strict, right? :)


Mark J. REED    <[EMAIL PROTECTED]>

Reply via email to