this post was submitted on 30 Dec 2024
-2 points (47.1% liked)
Rust
6175 readers
30 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't think the title is that clickbaity, since it's pointing out that there are places where Rust falls short. As with all tools, you should know when to not use them. If you know you will end up with a lot of unsafe code, then Rust may not be a good choice.
The TLDR doesn't say it but the article specifically points out the problem is when trying to use mark-sweep garbage collection in the VM, and talks about the problems that arise when you are forced to use C-like writing to combat the Borrow Checker. Apart from the rewrite in Zig being able to iterate on experiences from the Rust version, I think the points made out were perfectly good arguments about why writing unsafe Rust is far from a good experience. I see that experience reflected in the choice done for the Roc standard library too.
IMO it is clickbaity because it promises to compare rust and zig, but in reality it is just comparing unsafe rust and zig. IMO all it really needed to not be is the word unsafe in the title like they use everywhere else in the article. That is fundamentally my only problem with it. I do agree with your other points on knowing when a tool is good or not to use but I would have been much less likely to click on it if it mentioned unsafe in the title - I already know rusts unsafe is not the best and was expecting some arguments around the advantages of zig over safe rust -ie what most people write, not a small subset of the language.
I don't think it's fair to consider unsafe Rust such a small subset of the language that it requires calling it out as a separate thing from "Rust" in the title of an article. Unsafe constructs are necessary in the standard library and many crates, whether or not you use it in the code you actually write.