I’m currently in the process of doing a review of all the keywords we might want to reserve in edition 2018. However, so far, there has not been much consideration of new operators we might want to introduce in the edition. Therefore, I’d like to hear from y’all on what new operators you would like to see included in the language.
Propose anything you like, no idea is too crazy. We will do a review of the proposals later and keep the stuff that needs most fixing and makes most sense as operators.
A few notes:
- Operators desugar into traits in Rust.
a + bbecomes
Add::add(a, b)for example. Please try to include a trait in your proposal.
- Please include an example of the usage that makes the semantics reasonably clear, this will be necessary for a fair review
- Operators should be general in the sense that they should benefit the community as a whole and many Rust libraries and programs.
- Proposing domain specific operators is OK but think of how it can be generalized to more domains.
PS: To keep the thread somewhat overviewable, try to not debate specific proposals here too deeply This thread is more for collecting operator suggestions – if you want to delve into a specific proposal a lot and discuss pros and cons, I recommend you to open a dedicated thread for that.