Holy crap, I haven’t written on my blog for a long time. And I almost missed that the Rust community asked for blog posts about Rust in 2021 - but I am in time I guess, so here it goes.
Most Rustaceans won’t agree with this blog post, I guess. But I also think that’s fine, because that’s the whole point of the Blog-Post-For-The-Roadmap thing, right? Asking people for different opinions and starting a constructive discussion about the topic. I also must say that I haven’t read a single one of the other Rust-2021 Blog posts just yet.
I also think this will be rather short, but I hope I express my feelings in the best way possible for you all to understand.
I got into Rust at about Rust 1.5.0. After the first half of 2020, I felt like January was years ago, so I feel like Rust 1.5.0 was in another lifetime. So much happened this year, and still, so little was accomplished by me and my friends. The world turned upside down, essentially.
Rust changed a lot between 1.5.0 and the current compiler I have installed on my system:
$ rustc --version rustc 1.46.0 (04488afe3 2020-08-24)
The RELEASES.md file
is a whooping 9167 lines long.
We got cargo workspaces, we got awesome things like the
? operator (which I
definitively was not a friend of in the beginning), we got associated constants,
impl Trait, we got const functions and most
importantly we got async/await.
Fairly, that’s where I started to struggle to keep up. I definitively see the value in async-await and what it actually enables us to do with Rust, and how to do it. But I just couldn’t keep up with the change anymore. It was too much. I couldn’t cope learning all these new things just in time they arrived. I, to this day, struggle to write a simple Program with async/await if there’s too much iterators involved. I don’t know where my actual problems are, because I cannot see through the whole concept enough to understand what I am doing wrong.
The last five years were full of change. Good change, of course. But this last (almost)year just drowned me. Too much to handle.
My hope is, that Rust does not change anymore when it comes to features. I see that there is a lot of demand for const generics, especially by the embedded community. I understand why. I hope it doesn’t have any impact on me as a commandline-program-writing Rustacean.
But. There’s always a “but”, isn’t there?
I still have high hopes for some things concerning Rust. But they do not at all have to do with the language Rust, but the environment around it. As stated before, I’m a commandline-program writing person. I do not write web services (yet?), I do not write embedded stuff, I do not write high-performance/performance-critical stuff.
Essentially: I write programs in Rust that others would write in Python, Ruby or Node. I write them in Rust because I am a lazy programmer, because I do not care enough. I write Rust, because the compiler YELLS at me to get it right. If I would do the same thing in Ruby, my go-to-language for everything below 100LOC, I would get myself into a wheelchair because I would use every footgun available.
Deep inside, I’m a bad programmer and
rustc forces me to be a good one.
That was a bit of a rant, I hope you’re still with me. The paragraph above was for you to understand where I come from. I don’t care if my program runs in 1 second or 10, because the domain I write for does not care most of the time. But what is important to me, is that I actually can write my programs. Often, I cannot. And that’s simply because of one thing:
Libraries are missing.
Those who know me knew that this was coming. Libraries for domains that I care about are missing. That is calendar (icalendar) reading/writing, vcard reading/writing, email reading/writing (the format, not the networking stuff), … There are already libraries out there for these things, although they are far from being complete, usable or even correct. Writing a simple TUI MUA for notmuch is pain right now, because parsing email is really hard in Rust, and there are no high-level libraries available. The “mail” crate ecosystem is closest, but they do not yet have a parser.
There are, I am sure, more things in this part of the ecosystem (that is libraries for basic formats) where Rust could shine, but does not yet.
My request for Rust in 2021 is: Make things shiny. Make them available, make them work, make them correct, make them nice to use (E.G. parsing mails into tokens and handing them to me is okay, but having a high-level interface is much nicer).
To sum it up in one sentence:
Don’t change rust itself, but improve the library ecosystem.
That’s my hope for Rust 2021. Thank you for having me in this awesome community and thank you for reading.