I use Rust and I also use C/C++ and other languages as appropriate for each situation.
The fanboyism is a huge turnoff for me, too. But the anti-Rust complaints are also getting old.
Really, I’m just getting tired of everything in software engineering being turned into a competition, as if we’re cheering for our chosen sports team and we can’t stand to see the other team win anything. So much online discussion is wasted on Intel vs AMD, Mac vs Linux vs Windows, Rust vs C/C++/Go, React vs Remix vs 10 other frameworks.
It’s getting really hard to extract actual useful info from these permanent debates when the fanboys from different sides pour in to compete.
The best resources I’ve found are from people who aren’t afraid to use multiple platforms and acknowledge that they all have pros and cons. If someone can’t describe something in terms of tradeoffs, they’re probably not trying to make an honest evaluation.
Sure one can somehow write Rust-CUDA but is going to have an uphill fight versus someone just crusing along focused on the actual problem, instead of building infrastructure.
That is just one example.
Thanks for the upvote anyway.
The info is still there, you just need to use a different extraction technique.
Having shared mutable state, or doing bare pointer arithmetics is "morally wrong" in the sense that it's a constant source of bugs in production, sometimes dangerous. Any language that reminds you about that is doing a useful thing; C++ is very much capable of that, too.
Shared mutability can enable some bugs, like the existence of a CPU enables bugs, but that doesn't mean CPUs are morally wrong.
If incrementing doesn't always increment you are in for a bad time after all.
You are always going to have data that is shared and changes. Any non trivial system will. Rust just discourages the naive "just point to the heap" method that tends to work until it doesn't.
That is the problem not just with Rust but with today's tech. There is moral story or ideology everywhere. My definition of "engineers" is basically trade offs. Unfortunately that doesn't seems to happen much in software. The Rust Evangelism Strike Force.
There was an era when any rust code that use Unsafe is considered "morally wrong" regardless of whatever technical reasons or personal preference.
Isn't this right for any language, though?
The lack of a stable ABI is also a problem. For example, on my Linux distro, if a library has a bug, I just update the library and all software using it are fixed. No need to recompile everything.
So, essentially, the cargo system makes it easy to import weak code and hard to fix it later.
I am not saying that cargo is terrible, but it is a problem with rust that is not to be dismissed.
You need to rely on other people's code. Whether it std lib or not. Left pad is because of:
A) ease of modularization
B) problems with tree shaking
C) people want small easily understandable library
Which tbh works more often than not.
----
Stable ABI is a curse as much as blessing. Once you have stable ABI, you will never want to break it. Even if breaking ABI would be beneficial long term. See
https://cor3ntin.github.io/posts/abi/
And if you desire Stable ABI there is option of exposing C API in Rust.
----
> So, essentially, the cargo system makes it easy to import weak code and hard to fix it later.
Hard for who? Cargo can easily fork a package and recompile it. It makes it harder for distros. But you can ship static linked dependencies, easily.
Thank goodness cargo audit (for https://crates.io/crates/cargo-audit) in any case.
If your criticism is that there isn’t a lot of maturity in the ecosystem, then I would agree. The author also makes this point.
There will always be something the industry is excited about. Rust will eventually find its place and its hype will be eclipsed by whatever new trend/language is cool 4-7 years from now.
Those that will be confused and wonder what the hell it’s about is those who come from node/go/Java and think that using http is a “hello world” example of what Rust should do with ease.
> I also dont know why npm and node get so much shit for needing so many libraries but rust and cargo get a pass for these small libraries everywhere.
I think one big difference is the less promiscuous (but more frustrating) dependency management. In node I end up with 15 versions of a popular “should have been stdlib” library. In Rust you usually just have to allow one. So the libraries that form core functionality tend to be conservative about changes and get absorbed into std.
Js obviously doesn’t add things to the core platform very quickly.
> I also dont know why npm and node get so much shit for needing so many libraries but rust and cargo get a pass for these small libraries everywhere.
Because cargo is a better package manager in every aspect.
It is not. For example, cargo doesn't have namespacing, which makes the issue of name squatting worse. I'd like to have every crate of the tokio-rs organization on Github (https://github.com/tokio-rs) under a @tokio/ namespace or something like that. npm allows that.
Dismissive responses like that are part of why people talk about "blind optimism and fanboy-ism".
A piece of software can only help with some of the less important questions when you're working with many dependencies.
Also there are no namespaces and integration with other languages boils down to writing our own build.rs scripts.
In Rust, when you compile an earlier edition with the newer compiler it actually works
I think the author wrote off "dependencies" to quickly. I'm kind of unsure about the state of dependencies. A lot of libraries seem to be peoples hobby/free time projects. I ran into strange comments in libraries where people don't actually seem to understand the domain they're writing the library in. Like I think all of the http frameworks are pet projects?
My feeling after using rust and async was that it kind of tricks you into writing sub optimal code often. Like what could be solved with a singleton ends up needing a lot of boilerplate, new data structures, complex code so you end up writing in some other way, or burning your self with mutex.(aside note, everybody recommending a faster mutex that's not in the stdlibrary seems odd). I also dont know why npm and node get so much shit for needing so many libraries but rust and cargo get a pass for these small libraries everywhere.