eru 5 days ago

Haskell solves this nicely: your own operators just shadow the built-in operators. (And you can opt to not import the built-in operators, and only use your own. Just like you can opt not to import printf in C.)

1
dataangel 5 days ago

that's not the issue, the problem is the operator is required by the language to return a type from the stdlib, so you have to pull in the stdlib to get that type

eru 5 days ago

In Haskell, when you define your own operators (including those that have the same name as those already defined in the standard library), you can specify your own types.

There's basically no operators defined 'by the language' in Haskell, they are all defined in the standard library.

(Of course, the standard library behaves as-if it defines eg (+) on integers in terms of some intrinsic introduced by the compiler.)