What do you think about an imaginary possibility to specify user-defined operators in C++.
Such user-defined operator could be defined by operator name (arbitrary sequence of allowed chars?), its precedence, associativity and arity (something else?).
They could be used for many purposes: to help to build "tiny" DSLs over C++, for list comprehension etc.
Wouldn't this feature extend the language possible usage? What are other languages that allow user-defined operators? Lisp comes to mind, anything else? Any links about the topic?
Well, you know, Bjarne Stroustrup did propose such a thing...Generalizing Overloading for C++2000. :-P :-P :-P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With