Choosing Between GDC and DMD

℡╲_俬逩灬. 提交于 2019-12-01 14:33:14

问题


I'm new to programming in D. What are the pros and cons of choosing either DMD (2.061) or GDC (4.6, 4.7 or 4.8, snapshot). And what GDC version should I pick? I've successfully built a recent snapshot of GCC-4.8 and GDC-4.8 and it compiles a hello world program.

Here are my thoughts on pros so far:

  • GDC: More platforms, run-time performance
  • DMD: compilation-performance, more tested?

What about debugging support through GDB - does it differ between GDC and DMD?


回答1:


Use DMD as it is the reference implementation and is most widely used. It is also the most up to date as new features and fixes are primarily released in DMD (but GDC and LDC are released not too long after DMD).

As a newcomer you should consider DMD first, until you find specifics, which you need but don't find in DMD, then you can consider using GDC or LDC. Or use them right away, as all compilers share a common frontend from DMD, so switching them should not be so problematic (except bugs which may not be the same in all of them).

All 3 compilers currently support 32-bit and 64-bit (alpha/beta?) on Windows and Posix platforms.

Some experimental initiative is taken to support ARM platforms by GDC and LDC.

GDC and LDC may have longer compile times compared to DMD which is lighting fast - making edit/compile/run cycle a a pleasure, while GDC and LDC generally compile faster code which makes them more suitable for release builds (of course app testing should be done on the release compiler)



来源:https://stackoverflow.com/questions/14199676/choosing-between-gdc-and-dmd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!