Rust 2021: tone down the fanboyism

7 minute read Published: 2021-04-21

Since a couple of years the Rust programming language core team has a tradition of publishing a survey and gather feedbacks about various aspects of the language and the community around it. This call is generally called "Rust 20xx" and has a yearly cadence (generally happening in the last quarter). I don't know and can't measure how these feedbacks are taken into account but I always read the results, I read similar surveys also for other programming languages, they're interesting anyway. And now that the lights are definitively off on last year's survey, I'm going to play a little game and imagine the next one.

As the title implies, this won't be too technical, but I'll explicitate some parts that might be unclear for those who don't hang around that place.

I think there is something peculiar about the community around the Rust programming language. A loud, annoying vocal minority that creates an aura of "magic" about it.

The level of voluntary and involuntary evangelism of some people is frankly bothering and there are complaints (more on that later).

§ Let's analyze the technical aspects

Is Rust better or worse than other programming languages? What do you care! The question itself has absolutely no meaning without context.

Q: Is learning a new programming language expensive?
A: YES!
Q: Can learning a new programming language lead to a dead end?
A: YES!
Q: Can I avoid these pitfalls?
A: NO!

And also:

Q: At least can I mitigate the risks?
A: Of course

But surely not by going to public message boards and asking "hey folks, is Rust good for X?". How can anyone answer this question? People can only share their experience, and even after receiving many answers, the bias is strong.

  1. You're asking in the wrong place: it's not a great idea showing up to a meetup of book lovers and ask "guys, what do you think: is reading better than TV? Should I start reading more?".

  2. Different backgrounds and judgement metrics lead to biased opinions: if I am a newbie and you're a smartass with +10 years of experience, your "easy" and "doable" could be a mountain of troubles for me and my team.

  3. All programming languages suck in a way or another: there's always something that makes you grind your teeth. Your personal judgement will make the call if the advantages prevails over the pains. And only you know that, based on your use cases.

In my opinion the correct reasoning should be: try it, use it for six months and decide for yourself. Let's break it down with some examples from my experience.

I don't like the complexity and stiffness of the Rust type system but it makes refactoring so efficient and literally bomb-proof. Example: if I change the scope of a variable by acting on its lifetime or change a field in a struct it simply won't compile again until I've fixed everywhere they're used.

I hate the slow and nerve-wrecking edit-compile-test cycle of Rust but after I have compiled a release build and stripped all the symbols away, I can ship and deploy my entire application server in a single binary file of ~4mb size.

The tooling around Rust allows me to stuff everything into a Debian package, included a systemd Unit service, DB migrations and configuration files. This is another planet compared to deploying stuff with (ex.) Python because there are dependencies, some of them requiring to be compiled (e.g. the cryptographic libraries) and I don't want to compile a damn thing on a server, so you'll end up deploying a full bloated chrooted filesystem with Docker.

Rust is a tough nut to crack and it's hard justifying the time it takes to develop an API backend in Rust when competing technologies (Python, Ruby, JavaScript, ...) take less time to go to production, but a Rust backend will stay up no matter what and will not suffer from the decaying bitrot of dependencies.

Ok, now you know what I think of Rust: did that help take any decision?

§ Now let's have a look at the "factoids"

The TIOBE index, Hacker News, the Stack Overflow surveys about "most loved programming language" (seriously: "loving" a programming language!?) have a very relative weight, they are just data points that may end up being weaponized in good faith by a vocal minority - and it's all just background noise, when not straight trolling or worse.

See, I also have data points: a couple of weeks ago I had asked a friend of mine if in his city there were any Rust developers (I might need help for a future project). The joking answer was: "luckily, 0 infected so far".

We laughed (I hope the in-joke is clear) but the memes around Rust would rub me the wrong way in professional circles. I choose tools on a technical basis, not on the latest trends of the week in Nerdland. I'd like to avoid - in a hypothetical future - possible clients/colleagues having a kneejerk negative reaction when asking me about the tech stack I'd use for a project.

Example of an fictional conversation:

or - worse - set the wrong type of expectations just because someone suggests putting Rust in the mix.

This comment from this person (of the language team, nonetheless) resonates with me:

The Rust project is not a fan of rabid Rust over-evangelism (...), and sees it as
damaging and unhelpful. We discourage that kind of thing wherever we see it.
We're much more in favor of a measured, cautious approach.

I've never felt "soft-harassed" for being a Python developer. With Rust, I feel much more hostility against the language because of this fanboyism and the memes around it. I understand it is also folklore and it's funny to dick around and troll your friends with memes. I get it and I do it, too. In the appropriate places.

I hope that we will be entering a phase where using Rust will start becoming like using any other tool, with its pro and cons, with its use cases and that this emotional bubble will pop and we can finally get back to work.

§ One more thing

PLEASE stop putting "Written in Rust" in the bullet list of features of a product or library; being written in Rust says nothing about your project, it will just tell me that you're proud of your tooling. Rewriting something in Rust and assuming that it will make it automatically better it's purely delusional.

PLEASE how is it possible that a certain fringe of Rust players (THE VIDEOGAME!) keep posting stuff on reddit /r/rust that is relevant to the videogame instead of the programming language. This really brings interesting questions about people being able to accomplish simple tasks like READTHEFUCKINGSUBREDDITSUMMARYYOUJERK (but I'm digressing).