From the manual:

While

`*`

may seem like a surprising choice to users of languages that provide`+`

for string concatenation, this use of`*`

has precedent in mathematics, particularly in abstract algebra.In mathematics,

`+`

usually denotes acommutativeoperation, where the order of the operands does not matter. An example of this is matrix addition, where`A + B == B + A`

for any matrices`A`

and`B`

that have the same shape. In contrast,`*`

typically denotes anoncommutativeoperation, where the order of the operandsdoesmatter. An example of this is matrix multiplication, where in general`A * B != B * A`

. As with matrix multiplication, string concatenation is noncommutative:`greet * whom != whom * greet`

. As such,`*`

is a more natural choice for an infix string concatenation operator, consistent with common mathematical use.

Sometimes I define my own operator methods. Should I use `+`

only for commutative operations?