5 ms·
Pardon the slightly fanboyish comment, but I fail to remember a single negative response regarding Rust. Considering its domain I'm more than impressed.
by agumonkey 7y ago
Pardon the slightly fanboyish comment, but I fail to remember a single negative response regarding Rust. Considering its domain I'm more than impressed.
- colechristensen 7y agoI don't know much about rust but it seems like most of what I hear comes from fans so I end up doubting everything I hear.
- agumonkey 7y agoIt's just going in many places with a good reception tone. Consider this, cpp was roasted by Linus (IIRC), but there rust is considered an option for drivers.
- nindalf 7y agoNot a comment on Rust, but this sort of thinking appears strange. You hear "X is good" from 7-8 people. You dismiss these people as fans lacking objectivity. If you now hear "X has shortcomings" from 2-3 other people, do you now tell yourself "Yes I knew it all along. X isn't as good as the fans said it was" or do you think "Yeah, now that I have other opinions I can say that the majority of people think X is good and therefore it's probably good". If it's the first, that's just confirmation bias. If it's the second, that's better but I don't get it - why does the mere presence of a contradicting opinion make the first opinion more valid? In any case wouldn't you be better off trying X first hand and forming your own opinion?
- colechristensen 7y agoFan is short for fanatic. Ok it's not used much like that any more. To expand what I mean, when I recall what I have seen people say on Rust, some things strike me: overwhelming positivity, lack of depth, and it-cures-all-ills. In a word, hype. I don't owe anyone my attention to do some determination about how valid this or any other hype is. If I hear people talking about something and the loudest and most numerous voices are hype, I think it is fair and rational to have a solid doubtful bias much moreso than if conversation seemed more varied, substantial, and rational. Things that attract more rational people than hype-r people correlate with quality.
- rcxdude 7y agoSimilarly though, those that are hyped about something are more likely to speak louder than those who are just interested in using it. Looking from the outside you are likely to get a very biased sample.
- nindalf 7y agoIf you haven't heard criticisms of Rust, you haven't heard very much of Rust. If you give it more than a superficial glance, you will find that there are issues with Rust - build times, build artifact sizes, ability to integrate with non-cargo build systems, cross-platform compatibility, difficulty in finding developers proficient in Rust, time to train engineers new to Rust, FFI with C++ not being good and on and on. Even the very article we're discussing is by a person who is unhappy with the FFI experience and wants to improve it to unlock contributions to Linux. What makes people excited about Rust is not that it's perfect right now, nor do people claim that it's perfect. They're excited because they've seen a lot of progress in the last 3 years and see a clear path for it to become better in the next 3. Almost every blog post I've read mentions shortcomings. Take one I read today from way back in 2017 (showing that people criticising Rust is not new) - https://onesignal.com/blog/rust-at-onesignal/ https://onesignal.com/blog/rust-at-onesignal/. While they are very happy with their choice, they mention 1. Build times being very long. This is partly the fault of rustc generating verbose LLVM IR and partly because of code-gen macros like the ones used by serde (the crate that makes json parsing easy) 2. Libraries such as async clients for postgres and redis not being available. Http clients being immature and having to spend time improving them. 3. IDE experience being poor. Of course, 2.5 years later many of these issues are no longer true. * Build times have improved a 8-30% depending on the project in 2019 (https://blog.mozilla.org/nnethercote/2019/07/25/the-rust-compiler-is-still-getting-faster/ https://blog.mozilla.org/nnethercote/2019/07/25/the-rust-com...). Incremental builds are a thing now, as are check builds (they generate no artifact, just make sure your code is compilable). * Many more libraries available. Certainly all the basics will be covered once async-await becomes stable and all network libraries add support for it. * RLS is reasonably good, IntelliJ-Rust is better and rust-analyzer is being worked on. Current situation is much better than the days of using Racer and will likely improve within 2 years when rust-analyzer is mature. So there you go - an example of a Rust "fan" pointing out it's shortcomings 2.5 years ago, and the ways in which Rust has improved since then. If your issue is that you see Rust being mentioned by fans a lot, it's likely because we keep reading stories about vulnerabilities that happen over and over, issues that wouldn't exist in a Rust code base. If these vulnerabilities were less common, maybe we wouldn't see Rust being mentioned so much.
- flukus 7y agoThere are two types of languages, those people complain about and those nobody uses, rust is closer to the later at this point in time. Outside a few filter bubbles like HN rust is virtually unknown or little thought about. I think the biggest issues are reliance on cargo (the systems language that ignores your system libraries) and lack of a stable ABI, this is why it will never replace C. Many people find the borrow checker aggravating. Even rust fans seem to find the compile times far too long. As with all languages some will find it too high level and others too low level, should it throw exceptions or should it use error codes, etc. And let's not forget the rust fans brigading any disagreement. edit - do you mean in general or for this specific issue on the LKML, my reply assumed in general.
- ahartmetz 7y agoEven though you probably just picked some language design aspects as random examples... Rust doesn't have recoverable exceptions. It has fancy error codes. It is also quite low level in the same spirit as C++: only pay for what you use, and what you use should not be possible to write more efficiently by hand.
- cesarb 7y ago> Rust doesn't have recoverable exceptions. Playing devil's advocate: when compiled with panic=unwind, it has. However, the fact that when compiled with panic=abort they turn into unrecoverable exceptions tends to make the "should it throw exceptions or should it use error codes" choice clear.
- epage 7y agoWe're talking use cases. In Rust, you'd use Result where in C++ you would use exceptions. Panic is equivalent to assert and should not be used where you'd use exceptions in other languages.
- pjmlp 7y agoC++23 might get value type exceptions, and the design is even being discussed across ISO C working group, so that will eventually change.
- mkl 7y agoThere are plenty of negative comments about Rust, especially about borrow checker complexity and compiler speed. Maybe you're not paying attention to them?
- majewsky 7y agoAlso executable size because of monomorphization. I'm kinda worried that the top comment by goefft mentions an example module that uses Serde which is particularly vulnerable to this kind of bloat.
- StreamBright 7y agoSorry I am not familiar with monomorphization. What does it mean in the context of Rust?
- masklinn 7y agoIf you define a generic function, the function is "duplicated" for each concrete type it's used with. If the function is large, or it's used with many different types, that leads to a lot of semi-duplicates and extra code in the binary. For instance there will be one version of Vec::push for each type used in a Vec<T>. A common pattern to mitigate this (though not always applicable) is a generic trampoline to a monomorphic function for the cases where the genericity is mostly a matter of convenience e.g. let's say that your function works on strings, but for convenience you take a `T: AsRef<str>` (callers can pass anything from which a string reference can be created cheaply), the first thing you do is `let s = s.as_ref()` so the vast majority of the function is monomorphic (it takes only one set of concrete types as input). Rather than this: fn my_function(s: T) where T: AsRef<str> { let s = s.as_ref(); // do stuff with s: &str } you can do this: fn my_function(s: T) where T: AsRef<str> { _my_function(s.as_ref()); } fn _my_function(s: &str) { // do stuff with s } unless rustc decides to inline just _my_function into my_function (which would be quite odd), this leads to very little monomorphization and bloat.
- 7y ago
- jononor 7y agoI'm quite bullish on Rust. But note that it generally takes a while to find the "bad" parts of a technology, as they often are unintended consequences of "good" parts (which are clear and designed up front). So much that I'd consider it a sign of a mature technology when the bad parts are well-understood.
- otabdeveloper4 7y ago> I fail to remember a single negative response regarding Rust That's because the primary (and so far only) use for Rust is as an excuse to avoid learning C++. Nobody actually writes real software in it. As you doubtless already know, the programming language everybody likes is a programming language nobody uses.
- Jweb_Guru 7y agoI used C++ for 15 years before I wrote a line of Rust, and I absolutely love Rust. What does that say about your theory?
- otabdeveloper4 7y agoIt quite handily demonstrates the truth of my theory, no?