News for hackers. Stuff that matters.
Re:Rust in 2022 by wheelerof4te on Wednesday January 12, 2022 @10:01AM (#29907202)
Writing software, especially systems, low-level software is hard. Writing C the language, is not hard by itself. You can't confuse problem domain with language's percieved shortcommings.

Rust won't make systems programming any easier, it will still require the usage of unsafe part of the language. Only, you will also have to deal with a much more complex langage than C. That is why Rust has failed to replace C and C++.

Re:Rust in 2022 by sharikous on Wednesday January 12, 2022 @10:24AM (#29907609)
In C you find

- types of varying width (how big is an int?). Rust solves that

- null terminated strings. Rust's are saner

- what happens in an overflow? What are implicit casts? Rust clarifies those edge cases

- standard libraries often use NULL to signal error, no actually -1, no actually non-NULL. Rust has Result

And I haven't even scratched the surface...

All those cases are pretty basilar and happen everywhere. For me it's clear that C is much more complex than Rust if you think about the edge cases. All those safeguards are vital.

But yes, Rust is a much bigger language than C so it won't replace it for really low level, scarce resources tasks. For that look at Zig