Re:A trick to have arbitrary infix operators in Python
by kwertzzz on Wednesday January 26, 2022 @05:26AM
(#30083800)
Here is an interesting discussion from the julia language where string concatenation is indeed the * operator:
https://github.com/JuliaLang/julia/issues/1771
In particular:
https://github.com/JuliaLang/julia/issues/1771#issuecomment-...
Undoubtedly, it is a big surprise for new users (without exposure to free monoids :-)), that * is string concatenation.
By the way, in python juxtaposition ("abc" "def") is also valid.
I am trying to understand if the claim you are defending:
> concatenation is a natural product, not a sum
has any merit. I'm "arguing" to see if you have any rebuttals to my objections to your reasoning before I conclude that no, it doesn't.
Going back over this thread I am puzzled by one thing: that original claim was not yours, it was from /u/naniwaduni. You opened with "string + string". Why are you now so vehemently defending "string * string"?
Oh, and just for the record:
> Make those two words mean something instead of literally giving them strings, and see what they tell you.
Well, yeah, of course. Addition applied to fruit is a different operation than addition applied to strings. So?