What do you get if you multiply two strings? Or take the square root of
one?
I get very confused. But then i don't try to do those things, so it
doesn't matter much.
I don't think addition is a good metaphor for a non-commutative
operation such as string concatenation.
Fair enough. I differ from you on this - i agree that adding two strings
does not look a lot like adding two numbers, in particular because it's
not commutative (although i note that this doesn't stop mathematicians of
a certain bent adding ordinal numbers). But adding numbers is just a
particular case of the informal, natural idea of putting two things
together; i think + is a perfectly good symbol for that, and i think
string concatenation is another particular case of it, and so + is a good
symbol for string concatenation.
Having said that, i'm not zealous about it. It's more that i think + is
a member of the set of acceptable symbols for string concatenation, rather
than the only such symbol.
If not +, what symbol would you use for string concatenation?
As far as i can tell, in mathematics, strings concatenation is written by
putting the two variables together, as in multiplication - so the
concatenation of two strings a and b is ab. Not a lot of use. However,
strings under concatenation constitute a monoid, and the general symbol
for the operation of a monoid is *. How would you feel about that?
tom