6 ms·
I wish there was more stuff like this out there about rust, something, anything to counter what feels like blind optimism and fanboy-ism for the language. For m
by tayo42 5y ago
I wish there was more stuff like this out there about rust, something, anything to counter what feels like blind optimism and fanboy-ism for the language. For me its hard to get a good sense of the language being worth it. People really do hype it up, but i do know there are valid criticisms out there. IDK if they're all blog writers. My own recent experience trying to write a server kind of left me unsure about how practical using the language is after being pretty excited about it.
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.
- choeger 5y agoThe state of the ecosystem is concerning, but natural. It always takes some time until the best/standard libraries become visible amongst the noise. Lastly, I was looking for Parser combinators and the first three hits and no commits for years. That's definitely a red flag for me.
- adamnemecek 5y agoWhat did you get stuck on? > 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.
- zozbot234 5y agoBecause Rust is a `cargo` cult. /s
- zerocount 5y ago[Ice Cube voice]: Started off with too much cargo, dropped 4 letters now I'm making all the dough.
- formerly_proven 5y ago> Because cargo is a better package manager in every aspect. A piece of software can only help with some of the less important questions when you're working with many dependencies.
- adamnemecek 5y agoIt handles the insanely tedious parts of package management like version mismatch.
- pjmlp 5y agoIt doesn't handle the issue that every tiny piece of functionality is a crate, because everyone wants to have one on their CV. Also there are no namespaces and integration with other languages boils down to writing our own build.rs scripts.
- formerly_proven 5y agoI'm no node developer, but even with ~100 packages in a Python project it was really rare to see "version mismatch problems". There's probably a lot of talk about it because "just install newest spec'd version recursively" is not technically correct and can violate package version constraints, and it's also probably the only algorithmic thing you can put in a package manager, and optimal solutions are of course NP-hard, making it an interesting thing to work on. But practical impact? Far down the list.
- iopq 5y agoI literally just downloaded a Python program that didn't run because I had the wrong version In Rust, when you compile an earlier edition with the newer compiler it actually works
- adamnemecek 5y agoI have definitely run into these problem with much smaller projects in both python and js.
- Zababa 5y ago> 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 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".
- DenseComet 5y agoI'd love to see that happen, but as I understand it, that's a decision for the crates.io registry. Cargo itself doesn't deal with those types of details and you could host a custom registry that does have namespaces.
- adamnemecek 5y agoYou are confusing cargo and crates. Also this was a conscious decision.
- olingern 5y agoYou’ll find that a lot of software that runs large, enterprise applications is comprised of “pet projects.” Node.js and Python both started as pet projects. 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.
- panic 5y agoThis is my largest issue with Rust right now too. I’m happy to use it for personal projects on my own computer, but I don’t feel comfortable shipping a huge pile of code I don’t really understand onto someone else’s computer. I trust a self-contained standard library (like those distributed with Go and Python) much more than a patchwork of packages that depend on other packages, written by many different people, and which may be in different states of maintained, unmaintained, have security holes… putting my name on software based on these packages means taking responsibility for all that mess.
- kaidon 5y agoAll valid concerns -- but you have to worry about bringing in other code in your supply chain in almost any language, unless you are always doing everything from scratch! Thank goodness cargo audit (for https://crates.io/crates/cargo-audit https://crates.io/crates/cargo-audit) in any case.
- nine_k 5y ago> shipping a huge pile of code I don’t really understand Isn't this right for any language, though?
- Ygg2 5y agoYes. One glance at Log4j fiasco shows no one really understood all of the code.
- GuB-42 5y agoLog4j is not a standard library, it is just very popular, and it proves the original concern. It is treated as standard but it is not, and package muddle the waters even more. Remember leftPad. 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.
- thurn 5y agoI love using Rust, but I also get a bit annoyed by the hype. It's absolutely true, for example, that there are highly useful programming patterns that are extremely difficult to express without tools like garbage collection -- including many classical ideas from functional programming. But Rust users sometimes give you the impression that wanting to write any code which doesn't fit the specific shape the borrow checker expects is morally wrong.
- nine_k 5y agoDoes using Rc or Arc feel morally wrong? 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.
- zozbot234 5y agoMeh, bare pointer arithmetic (and shared mutability, for that matter) can be quite morally OK if it's properly isolated to a self-contained module, with detailed specifications on its behavior. That's why Rust has an `unsafe` facility. It's morally wrong to use it across modules (because it's obviously non-compositional), but that's not what Rust devs are doing. This is not C/C++.
- kaba0 5y agoAnd good OOP is exactly about encapsulating that mutable part.
- verdagon 5y agoIt's a bit silly to say shared mutable state is morally wrong. Rust programs have shared mutable state in that indices often refer to mutable data, and Java programs allow more conventional shared mutability without memory unsafety. Shared mutability can enable some bugs, like the existence of a CPU enables bugs, but that doesn't mean CPUs are morally wrong.
- kungito 5y agoWhy not write a singleton in rust? You can write a lazy global for that. The language does not prevent you from writing anything sane
- PragmaticPulp 5y ago> I wish there was more stuff like this out there about rust, something, anything to counter what feels like blind optimism and fanboy-ism for the language. 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.
- hardwaregeek 5y agoVery much agreed. It's not like the anti-Rust comments are much better. They're often quite biased in the other direction and rest upon arguments that boil down to "if you write C++ correctly, it's a very good language". But of course, Rust has flaws and design decisions that make it a poor fit for many people/usecases. Really I'd love it if people kept an open mind, did their research and tried to not let their biases rule their judgement.
- pjmlp 5y agoAll those arguments, as usual, also fail to discuss the existing ecosystems. 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.
- jacquesm 5y agoWhat weirds me out is to see your comment grayed out within minutes of posting. Have an upvote, it's a valid point you are making.
- natded 5y agoThe "dependencies" can be written off quickly as the "complaints" about them are ridiculous.
- alkonaut 5y agoIf you come at it from c/c++ systems programming and you never even had a decent package management story then of course Rust will be a blessing. 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.