Writing game engine in C++, considering switching to D

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Wed Feb 18 12:48:07 PST 2015


On Wed, 18 Feb 2015 20:29:33 +0000, Will Cassella wrote:

> Anyway, if anyone here can give me advice on whether I should transition
> or not, I'd appreciate it.

do you really expecting the answer "no, stay with C++" in newsgroup that 
is dedicated to D language? ;-)

as for some of your answer... using DMD from command line is dead easy 
both on GNU/Linux and on windows. you may miss visual studio integration 
and debugging, though. me not. ;-)

GNU/Linux (and FreeBSD) .so support seems to work good, we can even use 
libphobos as shared library.  it's still not possible to use libphobos as 
separate DLL on windows, AFAIK. yet you can write self-contained DLLs; 
alas, they will not share GC (so you can't transfer dynamically allocated 
heap object from one DLL to another).

GDC compiler is able to produce ARM code (and maybe LDC too, i don't 
know), and i don't know about druntime porting status. yet there is some 
work done, and i believe that we will have more of that. i don't think 
that DMD will support ARMs in nearest future, as it requires completely 
new codegen for that. so if you aiming at portability, you'd better test 
your code with LDC/GDC (which usually one version behind the current DMD).

as for the answer... writing such thing in D will be fun. and many things 
may change in the future (full support for windows DLLs, better ARM/
android support, ownership and better controlled memory management, 
etc.). i think that D is at least worth trying. you can always fallback 
to "better C++" mode and write the missing parts yourself (and this will 
be fun too).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150218/462c6480/attachment.sig>


More information about the Digitalmars-d mailing list