Zenith wrote:
The first time I tried working with it and found out there was no preprocessor
I almost gave up. (For those interested, here's how D deals with these issues:
http://www.digitalmars.com/d/2.0/pretod.html)
I think designing a modern programming language with a preprocessor is plain dumb. What does the preprocessor do that cannot be already accomplished by "const" qualifiers, inline functions, a fairly good importing feature and an optimizing compiler? The first 3 are just syntax, and the last one is commonplace nowadays.
Quoting the ReactOS Wiki about Rbuild (their custom build system), "string pasting is evil".
In particular, C macros force you into lazy evaluation and a bizarre form of dynamic typing, mixed with the nightmare of having to use tons of parenthesis so that the compiler does not misunderstand the expressions. That's not everything! Don't you know that dirty trick of the do{...}while(0) that allows you to "call" a macro as the only instruction of an if (in the line just before the else)?
Quote:
and having to implement a fair amount of a runtime (i.e. garbage collection), all of which were the main reasons I gave up on trying to use D for my OS and reverting, not to C++, but to C.
Are you sure you really need to implement garbage collection if you only use local variables?
Perhaps if you abstain from creating class instances the heap in not used. And so, you can use pointers to implement the CPU initialization and the memory allocator (I suppose the compiler automatically handles the reference counting and calls the deallocation function when needed), and finally call the "main" part of the kernel, that could use the language normally to a great extent.
I don't know if this makes sense. I've not programmed in D very much.
Quote:
If anyone would be willing to give me some pointers on getting GDC to work successfully so I can program my OS in D, I'd really appreciate that.
Looks like you were the first one that tried something like that.
JJ