News for hackers. Stuff that matters.
Re:Mitigating Memory Safety Issues in Open Source Software by hahahahe on Thursday February 18, 2021 @08:06AM (#26179354)
The more I look at Rust the more I realize it’s going to become the next standard language.
Re:Mitigating Memory Safety Issues in Open Source Software by arcturus17 on Thursday February 18, 2021 @08:22AM (#26179489)
You mean standard for systems programming?

I don't doubt that it will be a popular choice in that area, but even there it has competition from new languages.

And above all, I think it might take longer than a century to phase out all the C/C++ legacy code!

Re:Mitigating Memory Safety Issues in Open Source Software by ragnese on Thursday February 18, 2021 @10:09AM (#26180653)
It'll be interesting to see how it plays out.

I could absolutely see C++ devs jumping ship to Rust. I think const generics just stabilized or is about to. That was one of the first shortcomings I noticed when I learned Rust. I think custom allocators is pretty much the next big piece that would give C++ devs pause today.

But I don't see Rust picking up a lot of C devs. Rust is significantly more complex than C. You certainly don't have to use traits and Futures, etc, but you also don't have to use a bunch of features of C++ either and C devs still don't jump to C++.

Zig certainly gets a lot of buzz here, but I haven't personally looked into it. It does certainly sound like it's designed to appeal to the C crowd.

Re:Mitigating Memory Safety Issues in Open Source Software by cameronhowe on Thursday February 18, 2021 @10:55AM (#26181304)
I know I'm only one person, but I'm a C programmer at my day job and I do all my hobby projects in Rust.

For me cargo, rust-analyzer, and lifetimes/borrow checker just makes programming so much more pleasant.

edit: I dont go overboard on the more advanced features in the rust language, and probably write more C idiomatic code sometimes, but I still prefer using rust over C

Re:Mitigating Memory Safety Issues in Open Source Software by ragnese on Thursday February 18, 2021 @11:32AM (#26181897)
For sure. I didn't mean to suggest that nobody from C land would enjoy Rust. Just that I think the trend will be that more C++ people move to Rust than C people.

But my point of view is quite biased. I am still baffled that people would start new projects in C instead of just using a strict subset of C++, at least: classes, only trivial templates for generics, references, maybe smart pointers depending on what you're doing, but no STL, no exceptions, no inheritance, etc.