Earlier quoted context omitted.
> I doubt that we'll see it used for low-power/resource-constrained firmware I'm curious what your reasoning is for saying this?
Are you going to use Rust on a PIC12 with 32 bytes of data memory and max 256 code instructions? Of course not. Assembly is still king in this low-powered embedded class and will stay as such for the foreseeable future.
What is Rust and why is it so popular?
61–70 of 284 posts
Re: What is Rust and why is it so popular?
#62Rust is a great language if you use for what was intended, system programming and as safe substitute of C and C++. But it's not the answer of everything, to me it's nowadays abused in a lot of projects, there are instances of project where using Rust not only doesn't make a lot of sense but also can be slower than another languages, there are cases where Go is better, other where Node.js is better, other where Python…
> To me the Rust community seems to want to argue that everything should be rewritten in Rust I haven't seen this. At most, I've seen the push for rewriting important libraries where security is a core issue in Rust. I don't blame them. I'm tired of C/C++ being used everywhere because of performance, leading to the current-day situation of so much fundamentally unsafe code running the world.
Re: What is Rust and why is it so popular?
#63Re: What is Rust and why is it so popular?
#64> One of the biggest benefits of using a systems programming language is the ability to have control over low-level details.
I think this is a misguided conflation of "systems programming" and "low-level programming", those are separate things. See http://willcrichton.net/notes/systems-programming/
Re: What is Rust and why is it so popular?
#65Earlier quoted context omitted.
> Rust is without a doubt a (much) "better C++" but I'm not sure a better C++ is necessarily what systems programming needs most. I agree but if better C++ is what the PL industry can give me, then I'll take it, thank you very much! (Frankly at this point I'll take anything that isn't C++...)
There are alternatives that more appeal to my taste in the works. Given the cost of changing language, any language, I'll wait and see how they turn out before making decisions.
Re: What is Rust and why is it so popular?
#66Earlier quoted context omitted.
Yes and no. It provides some kinds of (important!) static analysis out of the box, but at the cost of complexity, which directly adversely affects some other kinds of (also important) static analysis. For example, there are sound static analysis tools that guarantee no undefined behavior of C code, but AFAIK, such tools can at best only work on a subset of C++, because of its complexity. Rust goes all out on eliminat…
Also, ownership checking only seems to work well for tree-like datastructures, but implementing something with cycles (back-pointers) immediately leads to nasty problems.
Re: What is Rust and why is it so popular?
#67The more pressing question: What is Rust and why is it so popular on HN?
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.
At this point, this is not true. There are significant production deployments of Rust. Heck, Rust code helped me post this comment, and read yours! (Okay that's strictly not true because I have Chrome on this computer, but had I posted from my phone, or from my other computer, it would have been Firefox.)
Re: What is Rust and why is it so popular?
#68Rust is not doing that, and that's a hurdle.
In my view, the "C flavor" is very important because it's a standard of how people are able to read code. This has nothing to do with the C programming language, I'm just saying that simplicity is what made C popular and easy to use. I can understand that Rust brings very nice innovations, but in my view it should have done so while keeping the "C flavor" as most as it could have.
I admit it's a conservative view, but I tend to believe that a language can be more easily adopted if at its most basic level, it's simple to read for beginners. Rust is not great: I'm not talking about its learning curve, I'm just talking about the "flavor". A language is a tool of expression and communication, features matter less than readability.
Re: What is Rust and why is it so popular?
#69Earlier quoted context omitted.
Also, ownership checking only seems to work well for tree-like datastructures, but implementing something with cycles (back-pointers) immediately leads to nasty problems.
That's not a problem with Rust, it's a problem with back-pointers. You basically just need to fall back on raw pointers and do all the correctness checking yourself, precisely because the ownership model is not that helpful here. (Although if there is a pattern of "owning" references which involves no cycles plus back-pointers that are actually identifiable as such, that is directly supported via Rc and Weak .)
Re: What is Rust and why is it so popular?
#70The more pressing question: What is Rust and why is it so popular on HN?
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.