Rust has been my favorite programming language lately. These are my thoughts and opinions on the future of the project, in response to the #Rust2019 call for blog posts. I write about what I love about Rust and what I want to see from it.
First, let me emphasize what I love about Rust. I love that Rust, at least in the form that was stabilized with 1.0 and exists now, follows a philosophy of pragmatism. There are many theoretically great languages out there, exploring interesting ideas in language design or various design ideals. Rust is not one of them. Rust wants to be the best practical language. Rust wants to be the most usable and effective tool for writing quality code in as many problem domains as possible. I love this.
This no-bullshit pragmatic approach to providing the most powerful tools for software development is what attracted me to Rust and made it my favourite language.
Recently, Rust has focused on things like ergonomics and productivity improvements. This is great, but meanwhile, significant groups of people have stood waiting on various major features that are important to their work.
Some of these important things, notably procedural macros and
const fn, were
recently stabilized. Other things, such as const generics and async/await, are
still WIP. Const generics in particular are blocking a lot of people.
I believe such features of major practical significance should be the top priority. If necessary, a similar approach to how things were done for previous major features, where only an initial subset that is enough for most use cases was stabilized, should be taken.
For smaller features, I feel like Rust should specifically focus on things that are known to be blocking people in practice. I like efforts such as the Embedded WG Wishlist. Let’s encourage more of this kind of focused communication about specific things people want and use that to drive development.
In general, I love how well Rust’s existing set of features fit together. I want this coherency in the design of the language to remain in the future. Hence, I hope that any new enhancements made to the language are in the spirit of making the existing language features work better, rather than introducing major features on top of what already exists. This is the major mistake that C++ makes IMO.
On this note, I feel like the current wave of major language improvements should probably be the last. Features such as const generics fill what feel like glaring holes in the language. I feel like after these improvements, there isn’t really anything major that the language needs. I want further changes to be increasingly smaller in scope and impact.
This is also important as a sign of maturity for the language. A mature language should be one that someone can read a book on and, after having learned it, use it to solve real-world problems for years to come, without having to spend effort on staying up to date with the latest advancements.
Rust is not yet at that stage. Yes, Rust has technically had strong stability guarantees since 1.0. However, as new features are added, the way people write code changes in major ways, so one has to keep learning new things to stay up to date. This makes the language feel … well … not stable in terms of its mental model.
I feel like Rust will soon be able to reach that point, after the current wave of major improvements. Future work should only focus on improving the overall development experience, without significant changes to the language itself, except for maybe minor fixups.
I am also personally not sold on “ergonomics” and cosmetic improvements to the
language. There are many languages that people continue to widely use in
production, despite being unergonomic. I would even go as far as to say that
adding new syntax sugar to the language should be avoided, unless the practical
impact is really big (as was the case with the
? operator). It adds
complexity to the language, which is not worth saving a little typing.
I also hope there will be no more editions, or at most one, if absolutely necessary. With edition 2018, the various syntactical quirks of the language were fixed. As the scope and impact of new features keeps getting smaller, there should be no more need for such breaking changes. Please, let’s not plan a Rust 2021 edition. Let’s not plan any editions for that matter. If a new edition is really necessary, I am sure we will feel it when the time comes. Let’s give ourselves some time to enjoy using the language how it is.
Portability and Platform Support
Various Linux distributions have expressed concerns about Rust, as providing a working Rust for all architectures that they support has proved challenging (due to bugs and poor support), while an increasing amount of important software in their repos has begun to depend on Rust (firefox, librsvg, etc.), so it is essential for them to provide working Rust.
Mozilla using Rust in Firefox has left users of more obscure platforms and operating systems without a modern browser. Firefox used to be far more portable than chromium or other modern browsers, but that stopped being the case due to the Rust dependency. I have seen blog posts voicing such complaints, as well as projects that fork the last pre-Rust version of Firefox to backport fixes to it as much as possible and support it for users of platforms without good Rust support.
C and C++ remain the systems languages of choice, because they work everywhere. Literally every platform has C and C++ compilers. Expecting a similar thing from Rust would be unrealistic considering the age and size of the project, but any progress in this direction is important and Rust could definitely make some big improvements.
Tooling and the Development Experience
While I do agree that having a good IDE experience, a fast compiler, great debuggers, etc. is important for the adoption of the language, I do not feel that this is a problem that the Rust project itself and its core teams should be as focused on right now. I feel like this is something that will naturally be resolved over time. I believe that as long as the language is great at what it does and keeps attracting the love of developers, people will develop tools for it, to improve the experience for themselves and others. The Rust teams should focus on delivering a great language that people love to use. I have faith that a community as enthusiastic and vibrant as Rust’s will inevitably end up creating great tools and solutions around the language.
I love the practical and pragmatic philosophy of Rust and the overall coherency of how the language design fits together. I want Rust to play to its strengths and continue in the same spirit. I want Rust to become mature as a language.
Let’s make finishing the major practical improvements to the language the main priority, so that few or no further major changes to the language are needed in the future. Let’s focus on making Rust usable for more users, through fixing and implementing the specific things people need for their work, as well as improving platform and architecture support. Let’s avoid increasing the complexity of the language through new major features or syntax sugar.
Finally, while good tooling and compile times are important, it is more important to get the language itself right, to get to this stage of maturity that I keep talking about, where people do not have to keep re-learning how to program in it and spending effort on staying up to date with language changes. There will be all the time in the world to improve the IDE experience, tools, compile times, etc. in the future.
I wish the Rust project another great and successful year in 2019!