3 ms·
> They should put big intrusive warnings on operator > overloads to discourage their use, like… "Warning, you are using the addition operator to concatena
by jonhohle 12y ago
> They should put big intrusive warnings on operator
> overloads to discourage their use, like…
"Warning, you are using the addition operator to concatenate two Strings. Don't do this!", said no compiler, ever. Only C does the "right thing" with char*s or chars when using '+' ;-)
In Swift, operator overloading requires no special syntactic support. Since it's a supported language feature, don't be surprised to see people use it.