D
This page or section is a stub. You can help the wiki by accurately contributing to it. |
D is a programming language, originally created by Walter Bright (from Digital Mars). Originally, the idea was to fix up some parts of C++, but in the meantime, some parts have completely changed. Even though the syntax of the D programming language is similar to that of C++, it is not a variant.
The D language is a language suitable for OS development, as some people on the forums have already stated. It might, however, require some extra changes. There is also a tutorial available on how to build a D cross compiler (using GDC).
Limitations
D is designed to be a systems language and is perfectly capable of running directly on the hardware with nothing more than an stub in assembly to jump to your main function. However, a lot of the language's features besides the most basic are tightly integrated into the standard library. Attempting to do string operations, slice arrays, hash arrays, use smart pointers, type checking on types not known at compile time, and a myriad of other features will lead to a number of missing symbols at link time that aren't well documented at all. Attempting to use reference the Phobos source and port the required functions will soon make you realize how interdependent functions are one another and before you know it you've ported the majority of Phobos in to your kernel (which by the way, references the C standard library a lot).
So in reflection, unless you want to port a D standard library into your kernel from the beginning, the only advantage of D over C or C++ for kernel programming is the advance templating and conditional compile features.
Of course, you could think about writing a 'stub' kernel in D, and then linking it with existing C libraries, like the OSKit.