Earlier quoted context omitted.
Weird, I did a search and I found 13,000 jobs mentioning Rust on Linkedin.
It's kind of how like when Go first bust out on the scene and every org that was "doing DevOps" claimed they had "Go in the building", the reality is you wrote CLI scripts and did 90% of your job in Java or Python. They may mention Rust, but doubt it's what you'll be solving the majority of business problems in.
What is Rust and why is it so popular?
91–100 of 284 posts
Re: What is Rust and why is it so popular?
#92I think one of the biggest benefits of Rust is it bakes in static analysis of code as a first class feature. Which means the language is amenable to analysis and you don't have to use third party tools to benefit from it. I also like some of the abstractions. They're clever in their simplicity. For example, an iterator over an array or vector is simply doing a for loop using pointers.
> it bakes in static analysis of code as a first class feature. This is basically what all type checking does. It's not specific to Rust.
The borrow checker is unique to Rust. So is compiler enforcement of only allowing thread safe data structures to cross thread boundaries.
Both of those are a pretty big deal.
Re: What is Rust and why is it so popular?
#93Over the last couple of months I've been slowly, but steadily playing with Rust. I work on embedded systems and while it's gaining traction only slowly, it feels to me reasonably likely that we'll be seeing non-trivial applications in the next 8-10 years. I doubt that we'll see it used for low-power/resource-constrained firmware, but lots and lots of embedded systems are now bulky Linux boxes with years of uptime, an…
> I doubt that we'll see it used for low-power/resource-constrained firmware I'm curious what your reasoning is for saying this?
1. A lot of resource-constrained firmware is so straightforward that Rust's benefits simply don't justify the effort of learning it and using it. In turn, without sufficient demand, there isn't much motivation for large tooling vendors to get into the game. Without the large tooling vendors, the kind of companies whose money could shift the landscape significantly won't get in the game, either.
2. Lots of embedded software development is outsourced. The margins are pretty small, and the companies in this field are both unwilling and unable to build technical expertise early on, so there's a lot of inertia.
3. Lots of embedded software is developed based on manufacturer-supplied SDKs. Manufacturers in this field tend to run high-inertia, cost-conscious software teams that take a long time to catch up with the rest of the software industry.
4. A lot of this inertia is mistaken for prudence ("we value stability", "we don't just jump on the hype train") and touted as a positive thing. That's why IoT security is what it is, for example (and it's not just IoT, and not just security. Lots of areas in the embedded space suffer from terrible practices). This is an industry where an embarrassingly large number of companies are just discovering continuous integration. A whole new programming language won't just happen overnight.
5. Lots of resource-constrained firmware is written with pretty strenuous regulatory constraints in place, under considerable pressure from internal standards, audits and so on. In some regards, Rust's tooling ecosystem still needs to grow and mature. AFAIK there's no serious equivalent to Coverity, for example -- and plenty of companies value it not just for the analysis it makes (which doesn't mean as much as it seems because the Rust compiler does a lot of static analysis on its own), but also for the kind of traceability and integration that it gives them, and the ability to implement the kind of internal processes that look good on paper during an audit.
It's a mix of legitimate and non-legitimate concerns (specifically, #5 is very legitimate -- lots of internal processes are just software safety theater, but many aren't).
Re: What is Rust and why is it so popular?
#94Earlier quoted context omitted.
Weird, I did a search and I found 13,000 jobs mentioning Rust on Linkedin.
It's kind of how like when Go first bust out on the scene and every org that was "doing DevOps" claimed they had "Go in the building", the reality is you wrote CLI scripts and did 90% of your job in Java or Python. They may mention Rust, but doubt it's what you'll be solving the majority of business problems in.
- machinist
- maintenance worker
- crater/packer
- painter
I wish there was a better name, still better than go, although they successfully adopted golang so now it is easier.
Re: What is Rust and why is it so popular?
#95Re: What is Rust and why is it so popular?
#96Earlier quoted context omitted.
I think that Rust's approach to safety -- soundly eliminate UB in safe code -- comes at the high cost of complexity. This affects how easy it is to write custom compilers (very important in the embedded space), but it is also not necessarily the best way to reduce bugs. For some, this cost is acceptable, and I'm sure some people may even welcome the high-level-looking code [1] that Rust and C++ support, but I think t…
> This affects how easy it is to write custom compilers (very important in the embedded space) Is there a reason you’d write your own Rust compiler frontend , rather than just letting rustc generate LLVM IR as it does, and then writing your own LLVM arch target? None of the Rust complexity leaks over into the LLVM IR it generates; it looks just like the LLVM IR that e.g. clang generates.
The leakage even triggers performance issues in compilers: https://users.rust-lang.org/t/5-hours-to-compile-macro-what-...
Re: What is Rust and why is it so popular?
#97Earlier quoted context omitted.
Ecosystem.. I don't know about node. But there's whole lot of java code and libraries out there. Otherwise why would people build other languages for the JVM? Ease of writing; Most of code is okay having a GC. But time to produce working code (not necessarily 100% correct code) is important. Rust is created for low level stuff. It is wrong to expect web backend programmers to deal with ownership, stack-vs-heap and al…
> It is wrong to expect web backend programmers to deal with ownership, stack-vs-heap and all. I am a web backend programmer. I respectfully disagree. I would much rather deal with ownerhip and related issues than deal with dynamic typing fallout. Unfortunately, I am stuck in Python land for some foreseeable future. > But there's whole lot of java code and libraries out there. That is true about every other popular l…
Those two things aren't connected. You can avoid both of them by using one of the many statically typed languages with a GC. It might be the case that Rust has other advantages over those languages that make power-assisted manual memory management a cost worth bearing, but it is still a cost. The amount of successful web backends written in Python/Ruby shows that performance demands on a typical web app are nowhere near high enough to justify doing away with the GC.
Re: What is Rust and why is it so popular?
#98Earlier quoted context omitted.
I think that Rust's approach to safety -- soundly eliminate UB in safe code -- comes at the high cost of complexity. This affects how easy it is to write custom compilers (very important in the embedded space), but it is also not necessarily the best way to reduce bugs. For some, this cost is acceptable, and I'm sure some people may even welcome the high-level-looking code [1] that Rust and C++ support, but I think t…
> Rust is without a doubt a (much) "better C++" but I'm not sure a better C++ is necessarily what systems programming needs most. As an embedded consultant, a better C++ is what systems programming needs most not for technical reasons, but social. So many embedded shops are embracing C++ and it's causing all the sorts of problems you might imagine. While it's possible that these shops will tack back towards a lower-l…
Re: What is Rust and why is it so popular?
#99Earlier quoted context omitted.
People like to believe that the biggest problem they have with their code is memory safety, a problem Rust puts a significant effort into solving. At this point, most uses of Rust are also entirely academic, which appeals to HNs because they prefer theory to reality because reality is messy.
I don't think it's fair to say that Rust is entirely academic. It has a lot of production users including some very large names: https://www.rust-lang.org/production/users
Re: What is Rust and why is it so popular?
#100The example of an error message in the blog post is the kind of thing that makes me seriously consider trying out rust. It's excellent. Are most rust error messages like that?
Years past we spent a lot of time honing general common errors to a pretty neat level, then we moved on to detecting specific cases. I would say that the quality of the output is a bimodal distribution with a cluster of really high quality for common errors, and a big but shrinking cluster of confusing errors for more advanced features.
To give an example, async await relies on three things: syntactic sugar (which means there's generated code that's not in the user written code), associated types (that had badly confusing type errors) and impl Trait (that had confusing type errors). The later two features didn't receive much love for a while because they were advanced features that a newcomer would be unlikely to hit, with exceptions for crates doing interesting but confusing things with them to provide a nicer API. But when the dust started to settle aroune async/await it was clear to me that people would be seeing the stabilization announcement, consider trying rust and jump straight to very arcane errors that would now be very easy to hit. This made me and a few others actually spend the time to drastically (if not entirely) improve those errors ahead of async/await stabilization, with the nice side effect that those features are also up to the level of quality that we want for newcomers. The syntactic sugar part also plays a part on how you explain succinctly and clearly that the type or inference error you're seeing comes from a return type materialized out if the aether, but I think we've gotten good at that.
If you will be picking up Rust to try it out, I encourage people to use nightly, not because of features but rather because we have diagnostics improvements daily and they can be the difference between having to read the book to understand how to fix your issue and just following the compiler's lead. As an example, you can see this recently landed PR: https://github.com/rust-lang/rust/pull/68267