News for hackers. Stuff that matters.
Re:Why I’m Using C by strategarius on Friday March 13, 2020 @10:19AM (#22567409)
"Rust does not run any critical component like Linux Kernel..." - and the only reason why it is not happening (provided that C and Rust have perfect interoperability, more and more C/C++ developers get familiar with Rust) is the fact that Linus Torvalds convinced by voices from Ethernet socket not to use anything but C. I can't wait for him to retire so that Linux kernel devs could pick up more modern toolset
Re:Why I’m Using C by steveklabnik on Friday March 13, 2020 @10:29AM (#22567508)
Incidentally, back in 2016: https://www.infoworld.com/article/3109150/linux-at-25-linus-...

> What do you think of the projects currently underway to develop OS kernels in languages like Rust (touted for having built-in safeties that C does not)?

> That's not a new phenomenon at all. We've had the system people who used Modula-2 or Ada, and I have to say Rust looks a lot better than either of those two disasters.

> I'm not convinced about Rust for an OS kernel (there's a lot more to system programming than the kernel, though), but at the same time there is no question that C has a lot of limitations.

Re:Why I’m Using C by adwn on Friday March 13, 2020 @10:29AM (#22567509)
As much as I love Rust: As long as Rust doesn't support all platforms which the Linux kernel supports, it really is a no-go for kernel code in general.
Re:Why I’m Using C by steveklabnik on Friday March 13, 2020 @10:34AM (#22567547)
"in general" is a bit strong; the maintainers have said:

> I spoke with Greg Kroah-Hartman, and he said he'd be willing to accept a framework in the kernel for writing drivers in Rust, as long as 1) for now it wasn't enabled by default (even if you did "make allyesconfig") so that people don't need Rust to build the kernel, and 2) it shows real benefits beyond writing C, such as safe wrappers for kernel APIs.

https://lwn.net/Articles/797828/

Re:Why I’m Using C by adwn on Friday March 13, 2020 @11:07AM (#22567818)
That's why I wrote "in general": It's not yet suitable for most kernel code, just for some specific cases (i.e., optional drivers).

Hmm, maybe I should have written "...for general kernel code" or "...for most kernel code", that would have been clearer.

Re:Why I’m Using C by steveklabnik on Friday March 13, 2020 @11:16AM (#22567912)
Ah yeah, I see that now... words are hard, I think you can read this both ways. Sorry about that!