3 ms·
Each language will have a different meaning of what exactly it means to "define your own". C++ restricts which symbols may be operators, but, you can "define yo
by jsprogrammer 11y ago
Each language will have a different meaning of what exactly it means to "define your own". C++ restricts which symbols may be operators, but, you can "define your own +".
- kibwen 11y agoIn practice it's very useful to distinguish between a language which "just" has operator overloading vs a language that allows custom user-defined symbolic operators. The existence of the latter is actually one of the few complaints that I have about Swift so far, but I'm sure many people will ardently disagree with me here. :P
- Retra 11y agoIt's a wonderful feature for writing DSLs, but it's also confusing when you intermingle DSLs with the standard language. It really tends to balloon the amount of information you need to know to read others' code.