3 ms·
> As for user-defined operators, if you mean something like Haskell's custom infix operators then no, I don't believe there are any plans for those. Do the Rus
by JoshTriplett 13y ago
> As for user-defined operators, if you mean something like Haskell's custom infix operators then no, I don't believe there are any plans for those.
Do the Rust designers actively oppose having them, or just not have any concrete plans to add them?
- kibwen 13y agoMerely lukewarm, I think. There are simply much higher priorities to focus on at the moment. Who knows what Rust 2.0 might hold!
- pnathan 13y agoI've always found the profusion of infix operators in Haskell to be heinously confusing, and seriously degrades readability and usability of libraries.limits on the o
- Dewie 13y agoThe problems I see with infix operators are: - It's not necessarily obvious what is an infix operator - Precedence and associativity I think Haskell has solved the first one: with all non-alphanumeric symbols in expressions being infix operators, and likewise for alphanumeric functions written with backticks. But precedence and associativity is not obvious, since that is something that you can customize. I think that user-defined infix operators with some severe limits on choosing precedence and associativity is a good compromise (many use backticks on functions in Haskell, and that has a default precedence).