On Tuesday, 1 November 2016 at 16:22:58 UTC, Andrei Alexandrescu wrote:
On 11/01/2016 09:41 AM, Wild wrote:
On Tuesday, 1 November 2016 at 12:12:29 UTC, Heisenberg wrote:
Just an idea. Do you think it would have any advantage compared to the
one that is written in C?

I think it wouldn't really be worth it.

I tend to think the same but for different reasons. Currently the Linux kernel is a large mature product that has its own evolution. It would be very difficult to reimplement it from first principles in any other language and get a competitive, timely product.

As an intellectual exercise, D's safety would help but at this point impart little advantage; the kernel has reached good stability and safety bugs are few and far across. This trend is likely for the foreseeable future.

Security is a big topic for Linux: https://lwn.net/Articles/662219/

Mostly the problem are drivers. They are produced hastily by careless companies without the scrutiny of the core kernel parts (like scheduler, file system, etc). I think D might help there, because it could enforce @safe or other properties onto the drivers.

Nevertheless, I don't see a successful D kernel in the foreseeable future. Building a kernel for IoT devices is trendy, but you want a lot more portability for that and C compilers are everywhere. On the server, you could build a hypervisor OS with D, but currently containers are hyped so much more. You'd only have a chance, if you also port the JVM onto your D-OS. Still, where is the advantage to Linux?

Reply via email to