That's a point. One should see * as a monoid operator rather than 
multiplication in the number meaning. I get it.

But I still believe that we are going way too far. I thought that all those 
algebra stuff "for everyone" was just a bad habit in the french education 
system for mathematics in the 70s (a total disaster if you want my point of 
view as a former math teacher). If you go this far, let me state :
1) + should not be used for floating point numbers as it is not associative 
(a + b) + c != a + (b + c)
2) * should not be used for floating point numbers as it is not associative 
(a * b) * c != a * (b * c)
If we go this far, we'll be in real trouble.

Yes, + for strings is not commutative. So what? It does not lead to some 
substantial problems.

Anyone coming from another langage will think "abcd" * s  as "abcd...abcd", 
not a concatenation of 2 strings. It is especially dangerous in a langage 
where types are not always explicit. I've seen a talk yesterday on cppcon 
2014 where they enforce C++ guys to code in a way that a Python developer 
should understand unless there is a very good reason not to do so.


On Monday, April 27, 2015 at 3:50:10 PM UTC+2, Yuuki Soho wrote:
>
> There's one argument for * over +. That string concatenation is not 
> commutative, and that + main property is to be commutative.
>
> Personally I don't mind * for string concatenation. If anything I would 
> prefer to have matlab style concatenation, using []; it would make sense to 
> use concatenation syntax for concatenation.
>

Reply via email to