News for hackers. Stuff that matters.
Re:Nvidia Security Team: “What if we just stopped using C?” by tomp on Monday November 07, 2022 @11:25AM (#33507922)
> Safer alternatives exist.

Do they? The only “safe” comparable alternative is unsafe Rust which as the name suggests isn’t actually safe.

Re:Nvidia Security Team: “What if we just stopped using C?” by jesse__ on Monday November 07, 2022 @11:38AM (#33508157)
You're right. Alternatives that tick all the boxes that C does, and are also safer, do not exist.

This guy is just doing the typical religious yelling about people doing their jobs (writing kernels, drivers, browsers, games, etc) with the most flexible tool for programming we've developed to date.

Maybe one day Rust will become dominant. Maybe someone will overhaul the aliasing rules of C, write some similar lifetime tracking tooling, and it will live on for another 50 years. Who knows. The reason people still use C and C++ isn't because they're good languages (or even that people like them, as the comment states), it's that until recently there have been very few viable alternatives, and for some domains literally none at all. They've largely been the only option for a long time.

Re:Nvidia Security Team: “What if we just stopped using C?” by notriddle on Monday November 07, 2022 @11:57AM (#33508483)
The article is about Ada SPARK, and nVidia using it to develop their firmware today.
Re:Nvidia Security Team: “What if we just stopped using C?” by jesse__ on Monday November 07, 2022 @12:01PM (#33508578)
Yes, I wasn't referring to the article, I was referring to the person comparing C to asbestos.

It makes sense for nVidia to trade development time and prefer a language with formal verification for their firmware.

Re:Nvidia Security Team: “What if we just stopped using C?” by nordsieck on Monday November 07, 2022 @11:54AM (#33508438)
> The only “safe” comparable alternative is unsafe Rust which as the name suggests isn’t actually safe.

And for some applications, Rust isn't even an alternative. Not every chip is supported by LLVM.

Re:Nvidia Security Team: “What if we just stopped using C?” by Gigachad on Monday November 07, 2022 @06:57PM (#33514279)
You typically don't have to write any unsafe Rust as an end user. The unsafe stuff is contained in very small and very rigorously analyzed standard library types. Which then provides you a safe interface to do all the stuff you normally do.
Re:Nvidia Security Team: “What if we just stopped using C?” by nyanpasu64 on Monday November 07, 2022 @08:47PM (#33515030)
In practice unsafe Rust is necessary to write many classes of nontrivial code, and is harder to get right in many ways than C++ (possibly C) and I think Zig.
Re:Nvidia Security Team: “What if we just stopped using C?” by Gigachad on Tuesday November 08, 2022 @01:02AM (#33516331)
Examples? I have been writing production rust for about 6 months now and haven’t had to use unsafe yet. Looking at the standard library internals I see it a lot but everything I have had to do works in safe.