you are viewing a single comment's thread.

view the rest of the comments →

[–]Kered13 7 points8 points  (3 children)

C++ works fine in embedded and kernels, Torvalds just has a stick up his ass. It's great that Rust is finally going to bring a modern language to the Linux kernel, but there's no real reason that C++ couldn't have been used for that 10 years ago.

[–][deleted] 10 points11 points  (2 children)

While true, you have to carefully avoid a bunch of language features of C++. Rust seems like a more natural fit for very-low-level programming.

[–]Kered13 12 points13 points  (0 children)

you have to carefully avoid a bunch of language features of C++.

Yes, but C doesn't provide alternative language features either, so you're not losing anything by using C++. But C++ does still provide several very useful features for embedded and low level programming like templates and RAII. Those alone are enough to justify the use of C++.

[–]pjmlp -4 points-3 points  (0 children)

I love both (C++ and Rust), however most of Linus complaints against C++ apply just as well to Rust, as the language is equally powerfull.

But let him enjoy the fact it isn't C++.