3 ms·
Which invertible commutative string operation would you choose for + ? This might be nice from a math point of view, but I think users are going to be confused
by hayd 5y ago
Which invertible commutative string operation would you choose for + ?
This might be nice from a math point of view, but I think users are going to be confused using "string"^3 for repetitions (instead of "string"*3). + and * make too much sense to the unwashed masses.
At any rate, explicit is better than implicit.
- dragonwriter 5y agoThere is no reason you couldn't use str * str for concatenation and str * integer (or even string * real) repetition. Well, except if you wanted to support user classes that could duck type as both strings and numbers, which it would make awkward.