14 Oct
2021
14 Oct
'21
7:05 a.m.
Peter Ludemann writes:
From a mathematical point of view, x+y is equivalent to y+x,
Yes, other things being equal, mathematical purists would prefer '*' to '+' for string concatenation *because* it's not commutative, but they're not equal. I imagine a good majority of folks can guess what '" " * 8' and '"foot" + "ball"' mean, but they'd have a lot of trouble even with '"two" * "two"' and '" " + 8'.
"++", "--", etc. would have been better choices for operators
I don't think I agree that proliferating operator symbols for different types is a better idea. I think making judicious choices for overloading (with the default being Just Say No) is the best we're going to get. Steve