Is it possible to define '+' operator for string as '*' do for them?

See also the Julia FAQ: Why does Julia use * for string concatenation? Why not + or something else?

In general, when you learn a new language, you should try to learn the idiomatic “spelling” of things in that language. Trying to write code in Julia that superficially resembles some other language (e.g. Python) is just going to get you into trouble — even if there are no technical issues (ala type piracy), your code won’t fit nicely in to the surrounding ecosystem.

22 Likes