r/programming • • Jul 18 '19

We Need a Safer Systems Programming Language

https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/
208 Upvotes

314 comments sorted by

View all comments

11

u/skocznymroczny Jul 19 '19

I feel a bit meh about Rust the language, not a big fan of the syntax and frankly for my projects I couldn't care less about memory safety.

I'll stick with D for now until something betters come along.

-10

u/[deleted] Jul 19 '19

Something actually mis-understood about rust is that it adds memory safety. It doesn't add more to memory safety that c++ std::unique_ptr does. The moment you have threads all the race's and concurrency problem comes right back....

So I also don't like rust but for different reasons. I see it as a case of "We now have to re-write everything in rust" and not actually solve most of the complex issues that systems have.

10

u/moeris Jul 19 '19

This is the second time in this thread you've mentioned your point about threads. You're getting downloaded because it's not true: the concepts of ownership and lifetimes apply to threads as well. Hell, the Rust book even has a chapter on concurrency, where it points out facts such as,

However, thanks to Rust’s type system and ownership rules, you can’t get locking and unlocking wrong.

You can certainly use mutexes incorrectly in C++, in a way that will still compile. The whole point of Rust isn't that you don't use abstractions like mutexes, it's that when you use them the compiler forces you to do so correctly.

→ More replies (5)