Proposals like this are full of disadvantages, usually without any real, significant benefit. Specifically:
- Custom operators in general aren't easy to do correctly, since they make it impossible to parse (or even lex!) the source code without first interpreting it to some degree. This tangles the first few stages of compilation together, from lexing to rudimentary type checking, which in turn makes the compiler more complicated, causes it to have more bugs, and it will be harder to maintain.
- For the same reason, code will be harder to read to humans as well. Apart from the long-established mathematical symbols, I have no idea what the code means when I see Haskell or Swift code that is full of
<<~!^%>#>>operators. It's just plain inferior to typing out a reasonably descriptive method name. Even if you aren't planning to support custom operators in their full generality (which I can't tell because the title and the post body are in contradiction here),~is not something that is immediately recognizable as "custom assignment". At most it could lead to associations of negation (from C, Lua, etc.). - Apparently, you want to customize assignment. That is not something that Rust can reasonably support, either. The very memory model of the language (and lots of existing
unsafecode!) is based on the observation that assignments (and moves in general) are a trivialmemcpy(). Custom assignment would break this fundamental assumption badly.
To be perfectly honest, I highly doubt that. First of all, writing speed is not the bottleneck in getting things done. Second, it just doesn't matter all that much. Code is read much more than it is written, and a language should optimize for the understandability of the code, and not on making it easy to hammer out undecipherable blobs of symbols as "fast" as possible.