3 ms·
They could get the benefits they are chasing just by facilitating switching to modern C++. And, they might be paid some attention.
by ncmncm 4y ago
They could get the benefits they are chasing just by facilitating switching to modern C++. And, they might be paid some attention.
- woodruffw 4y agoModern C++ isn’t spatially or temporally memory safe, which are the primary benefits in question. You can write subsets of C++ that are spatially safe (and you have been able to for quite some time), but temporal safety is completely out the window. And note: those limited spatial guarantees also go out the window as soon as you interact with third party code.
- kramerger 4y agoKernel code is by design "insecure". You can bend over backwards to make it look secure (see the few Rust OS implementations that exist today), but at the end of the day you can't combine "safe" languaues and real memory security as you are modifying page tables and programming DMA using raw addresses.
- woodruffw 4y agoBoth the OpenSSF and Linux Foundation work on things other than the kernel. (But even beyond that: Rust has an entire sublanguage ("unsafe Rust") that's intended for these purposes. The point of unsafe Rust is to do things that are safe but the compiler can't reason about, so that subsequent safe Rust can rely on abstractions built in unsafe code.)
- eternityforest 4y agoEven Torvalds seems open to Rust. I think the whole world is paying attention. There's inertia, and some people don't think Rust is ready, but it seems like more and more people want to see that C++ gets replaced. Most of the arguments I see for C are ecosystem or legacy related, purely based on a preference for simplicity or an assumption that it's always better, or not technical at all("Real programmers" feeling insulted by languages that try to hold your hand, or preferring the challenge of C).
- ncmncm 4y agoRust has everything Torvalds said he hated about C++. The more he learns about Rust, the less open he will be to it. It is deeply weird that you would pivot to "arguments ... for C". There are no legitimate arguments for C. C++ usage is still growing by leaps and bounds; more people pick up C++ for professional use each week than the total now employed coding Rust. The realistic place for attention to improve security is, first and foremost, displacing C; what you transition to matters much less. It is much easier to transition to C++ than to Rust, and modern C++ eliminates temptation to unsafe coding because unsafe code is just more work for no benefit. You can switch just about any C project to build with a C++ compiler in a day or two. Then you can modernize incrementally, starting with new code, and updating key subsystems according to what yields most benefit for new code. This is not theory: it was done in Gcc and Gdb with imperceptible disruption and massive benefits.
- the_biot 4y ago> There are no legitimate arguments for C. Bullshit. You're not helping your argument by denying the counter-argument's right to exist. > more people pick up C++ for professional use each week than the total now employed coding Rust. Do you have any facts to back up this thing you just pulled out of your ass? > You can switch just about any C project to build with a C++ compiler in a day or two. Then you can modernize incrementally, starting with new code, and updating key subsystems according to what yields most benefit for new code. That's if you want to do that; not everybody wants to switch to C++. I know you won't understand. A wise man once told me, if you tell a group of programmers you're going to do a project in C++, half of them will just quietly acquiesce, and the other half will spontaneously vomit. You cannot underestimate how much C++ is despised.
- ehvatum 4y ago> A wise man once told me Sounds legit.
- ncmncm 4y agoWe all know some are irrationally, rabidly hostile to C++. The most hostile know least about it. But we need not try to accommodate them. Millions of working programmers use C++ successfully every day. Those using modern idioms have no greater trouble with memory safety than in other "memory-safe" languages. The unfortunate subset who treat it as "better C" for fear of learning anything new are nearing retirement. A good example of sensible use of modern C++ in kernel and essential utility code may be seen in the SerenityOS project.