3 ms·
In fairness, that's more or less what I remember (from 20 years ago). Operator overloading in libraries built by incredibly smart people could produce beautiful
by stickfigure 4y ago
In fairness, that's more or less what I remember (from 20 years ago). Operator overloading in libraries built by incredibly smart people could produce beautiful syntax. Unfortunately, most library builders weren't that smart. Maybe it's better now.
As a language feature I can't feel more than ambivalent about operator overloading. Kotlin has it, Java doesn't, I'm ok either way.
- kaba0 4y agoI think Rust’s approach is a good tradeoff. Don’t allow arbitrary operators like haskell/scala (!!< is never gonna be readable), but do give an Addable/Multipliable/etc interface/trait which will define add/multiply, to which the corresponding symbols desugar to. It might even help heal the object-primitive rift in java.