News for hackers. Stuff that matters.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by gameswithgo on Wednesday March 31, 2021 @11:59AM (#26648888)
I think Zig could end up being much more popular for domains where Rust's safety and correctness features are less important. Something like a bluetooth stack is exactly where Rust is ideal though imho. Some for crypto libs.
Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by geraneum on Wednesday March 31, 2021 @02:56PM (#26651456)
I believe the number of domains which benefit from Rust’s safety features combined with its runtime performance are vast. IoT, hardware drivers, autonomous systems, embedded systems, (cars, drones) infrastructure, etc. I would choose Rust in these scenarios if I have choice.

I understand that the language has a steeper learning curve but it’s an upfront cost compared to C (or Zig?) where you have to put even more effort later on chasing the same bugs which Rust could’ve protected you from.

I don’t know Zig well enough so I’m not arguing against it. It’s just what I think about being safe vs being easier to learn.

But I see your point. At the end of the day, the growth of the language happens almost organically and might not follow the logic I put forward.

Re:Android's new Bluetooth stack rewrite (Gabeldorsh) is wri... by gameswithgo on Wednesday March 31, 2021 @03:18PM (#26651754)
I think of Zig as a quarter step between C and Rust. You don't get memory safety, but you DO get better handling of undefined behavior, and option types, and better protection from array bounds overruns.

So like a single player video game, it might be an easier overall choice, in a hypothetical world where ecosystems are similarly fleshed out.