3 ms·
To a degree this ammuses me greatly. Rust allows you to opt-out of safety. While your proposal (which I agree with to be clear) allows you to opt-in to safety i
by valarauca1 11y ago
To a degree this ammuses me greatly. Rust allows you to opt-out of safety. While your proposal (which I agree with to be clear) allows you to opt-in to safety in C/C++.
This really cuts to the core of ideological differences between C/C++ and Rust camps. C/C++ programmers tell the compiler trust me, while Rust programmers say check me. I can't help but feel to a degree the Rust ideology is superior. To make by bias clear I work in C, and write in Rust in my spare time.
- flohofwoe 11y agoTo be clear, I love Rust's approach to safety. I just don't think it is an realistic expectation that we can re-implement all security-critical C code in Rust until the sun goes super-nova ;)
- kevingoslar 11y agoIt's probably not going to be a rewrite of existing systems, but a switch to new systems written in safer languages while phasing out the old C based systems. On the server: unikernels. On the client: new mobile platforms, like OSes based mostly on web technologies (which while not quite being there yet are getting more and more powerful). C/C++ is not only a poor choice in regards to security, but also to develop for hardware with hundreds or thousands of cores, and all hardware platforms are moving in that direction. Yes there are of course ways to deal with that in C/C++, but other languages are much better at this. Within just a decade or two I can see a fundamental shift away from the old computing paradigm, at least for the majority of systems in mainstream use.
- pjmlp 11y agoOn the mobile it is already kind of happening: iOS slowly going Swift (Very few WWDC 2015 presentations were Objective-C) WP 7 used only .NET. WP 8/10 use .NET and C++/CX. Android uses essentially Java and Google only allows a very constrained use of C and C++ in their NDK. So even though C and C++ are on the kernel and lower platform layers, at least the user space use is lower than on desktop platforms.
- pjmlp 11y agoThere is a big difference opting out of safety and having to opt into safety in every code line one writes. Safer systems programming languages were already available outside AT&T when C was born. Rust is just the latest addition to them.