I'm trying to do the same, trying to compile OS free code but I haven't so far been successful because D requires the runtime and then also Phobos. Compared to C/C++ where you can create pretty advanced stand alone code without even include any standard libraries, this because much of C++ is part of the compiler.

With D this is not the case. I don't really have a good picture what is part of the compiler or the runtime. Even creating a simple sample class and create a stack object requires that I include *everything*, that hairy runtime phobos nest. The runtime also has dependencies into Phobos which I find to be very inconvenient and I don't think it is a good idea. The runtime should be stand alone and Phobos should depended on the runtime and not vice versa.

Also, I am not too happy about the change "scope for allocating classes on the stack", http://dlang.org/deprecate.html#scope%20for%20allocating%20classes%20on%20the%20stack.

This change requires you to include std.typecons from Phobos, which means you have include a library for a simple operation like stack allocation. C++ does not require this as it is a part of the language.

Compared to C/C++, D is very hard to get to work in the embedded/OS less environment because of this.

Reply via email to