On Tue, Apr 24, 2001 at 03:09:18PM -0400, Stephen P. Potter wrote:
: Lightning flashed, thunder crashed and Nathan Wiger <[EMAIL PROTECTED]> whisper
: ed:
: | Under this proposal, string concatenation would be acheived by the
: | *combination* of "" and +. So, in Perl 5 you would have something like
: | this:
: | 
: |    $string3 = $string1 . $string2;
: | 
: | In Perl 6, you would do this like so:
: | 
: |    $string3 = "$string1" + "$string2";
: 
: Once you go this route, you've pretty much destroyed the usefulness of
: having a concat operator.  It is far less typing to do
: 
:        $string3 = "$string1$string2";

I would consider thinking about the bigger problem of:

$string = foo() [something here] bar();

Of course, if we choose to remove the concat operator all together
we're left:

$string = join '', foo(), bar();

I could live with that if I had to, but only if I had to.

: I've seen someone say something about concating a large list of scalars.
: Can you imagine:
: 
:     $longstring = "$short" + "$another" + "$andathird" + "$andafourth" +
:               "$onemore" + "$okanother" +"$wowlots" ....
: 
: Personally, my fingers got really tired of having to use the shift key for
: all the quotes, the $, and the +.  Of course, I'd normally just write that
: as
: 
:     $longstring = join('', $short, $another, ... , $wowlots);

I would do that for this example anyhow.

-- 
Casey West

Reply via email to