Nathan Wiger wrote:
> string concatenation would be acheived by the
> *combination* of "" and +.
> $string3 = "$string1" + "$string2";
> Here's the key: The quotes are REQUIRED. If you left them
> off, you'd get numeric addition. There is no magic type
> inference.
That, imho, is bending way too far in the wrong direction,
just for the sake of having a "+" operator that seems to DWIM
on both strings and numbers. By that logic, we should dispense
with cmp, eq, lt, etc. and replace them with
"$a" <=> "$b"
"$a" == "$b"
"$a" < "$b"
etc. There really is no inherent benefit in having "+" mean
concat in addition to, uh, addition, and it seems to be causing
an undue amount of consternation. Certainly "+" is no more
intuitive than "##" or "cc" or "cat".
I also don't like the special status accorded the the left operand
in your proposal. Seems unecessarily capricious and restricting.
--
John Porter
It's a sky-blue sky
The satellites are out tonight
let x = x