Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera115855yLisp.
But that might be cheating as there really are no operators as every operator is a function and vice versa.
Problem with custom operators is precedence.
https://google.se/amp/s/...
Adding operators that work well with all other operators is hard to begin with and with custom ones that can be declared you can easily end up with ambiguous syntax or unintended behavior.
C# has operator overloading, as have some other languages, but this works since the basic precedence does not change.
So, having build my own scripting language, I can say that except for langs like lisp or langs with a very strict syntax or no precedence except parentheses, you probably do not want to create custom operators.
But it would introduce some very interesting new bug possibilities :P
Related Rants
Is there a programming language or library that lets you customize the shit out of it? Something like C++ templates but with special symbols as custom operators?
question
compiler
customization
templates