Not Feeling the Love for Rust
Published at 00:56 on 18 March 2023
The Rust programming language has been hyped to be the “most loved” one for several years now. I personally can’t feel the love.
Sure, Rust is fast. So what? Python, Java, and Kotlin are almost always fast enough for me.
Rust’s memory management is nowhere near as convenient as the memory management in a garbage collected language (like Python, Java, or Kotlin). There’s all sorts of confusing rules to remember. It took me rereading those rules three times to finally get it. By contrast, with garbage collection, I don’t have to worry about stack versus heap, borrowing, boxing, and all that crap. I just pass objects around as easily as Rust passes primitive types, and everything just works. The computer handles all the details behind the scenes, leaving me free to concentrate on other things.
Yes, yes: efficiency. Again: so what? Garbage-collected languages are fast enough for me. As Knuth once said, “Premature optimization is the root of all evil.”
Suppose for some reason I bump into a need to go faster than Python or the JVM allow. Then what? Still not sold on Rust. I’ve run into this sort of thing before: the problem was caused by one tiny bit of code, and rewriting that little bit of code in C (which both the JVM and Python can easily call) fixed the performance issue handily. Yes, C isn’t as nice as Rust for memory management, but it was only one little bit of code, and unlike Rust (for which such support is still in the early stages), it is super-easy to call C from within Java or Python.
And then we get to graphics. Some of my recent coding has involved making tools to modify graphics files. If one is modifying graphics files, a graphical user interface is almost always essential. Python supports Qt, and Java has Swing. Both are excellent cross-platform GUI libraries that, with care, can achieve results that look almost as good as a native application. Rust basically has only GTK, which is a poor second-class citizen for anything other than Linux.
Maybe if I was doing lots of embedded systems on resource-constrained platforms Rust would be more appealing to me. But I’m not, so it’s hard for me to feel the love.