Don't keep complicating the syntax (soft post, maybe off topic, maybe irrelevant)

Regarding pure syntax sugar, I think the solution would be to have compile-to-rust languages a’la CoffeeScript to experiment with the additions. That may satisfy people who want really fancy syntax or don’t like Rust’s, and help try out additions for Rust better to avoid adding something half-baked to Rust proper.


BTW, in your question there are a couple of implied assumptions:

  • that more syntax makes language more complex,
  • that adding stuff leads to problems like C++ has

which I don’t think necessary have to happen. For example, returning iterators from functions was hard or impossible in some cases. Rust has added impl Iterator syntax to make that simpler. Similarly, working with futures is currently quite cumbersome, but Rust is adding pinned references and async/await syntax to make futures simpler to use.

C++ is used as a cautionary tale of misfeatures and piled-on complexity, but I think C++ is unique in that regard: it’s built on top of 45-year-old C, and it itself has nearly 40 years of backwards compatibility to preserve. In the near future Rust is going to have it easier, because Rust 1.0 is a much more modern and cleaner foundation for the language than the early C/C++ was, and Rust was able to learn form their mistakes.

In 40 years Rust 1.x may likely be outdated and similarly problematic. But Rust has editions which are able to break things more than C++ can, so maybe Rust 2050 edition won’t be that bad?

18 Likes