Ah that's interesting, didn't know D had goto case statements. Btw, what are some projects you've used D for? What are other surprising lesser known features of it to you?
The biggest project is implementing the D compiler itself in 100% D. Don't have much time for other projects.
Nested functions are a little gem. I stole the idea from Pascal. I've since discovered that they can nicely clean up spaghetti code that C engenders, without losing efficiency.
Nested functions would fit into C seamlessly, I sometimes wonder why the C people don't adopt it. I can only assume they just don't realize how sweet they are, which is understandable because you just have to use them a bit to see it.
D's nested functions (like Pascal's) have two frame pointers - a dynamic frame pointer (like C has), pointing to the caller's stack frame, and a static frame pointer pointing to the enclosing function's stack frame.
This allows the nested function to access the enclosing function's variables.
2. you can declare them "static", which means they don't have a static link and cannot access the enclosing function's variables
3. if garbage collection is enabled, you can pass a pointer to the function out of the enclosing function's scope and still safely access its variables
There was a self aware version of lisp. You could feed it the program specification and it would write a 100% conforming program itself and run it. Unfortunately first time they fed the spec for a real project it outputted the words 'dear god no' and deleted itself.