DMD and Phobos Code Review
April 18th, 2008 by proj
I’ve been spending time in dmd (via gdc) and libphobos as a research project. While I have enjoyed writing D code I quickly have run into some ugly aspects of D.
DMD source:
* Ambiguous labels with copious use of gotos
* Commented out printfs for tracing support
* Class and struct definitions scattered across multiple files
* Bugs?!
Phobos Runtime:
* Use of a stop the world, mark and sweet garbage collector! Suckage for realtime
* Signals SIGUSR1, SIGUSR2 are used to pause all threads while garbage is collected
* Buggy meta-programming that results in strange segfaults in objectInvariant() and gc methods.
* Unpredictable thread stalls in the simulation
* Non-cache friendly touching of memory during marking and collection
I’m kinda pissed because I realized I would have to rewrite the runtime and the garbage collector. I bet JY could easily handle that.
No related posts.






