Who here actually uses D?
Dmitry Olshansky
dmitry.olsh at gmail.com
Sat Jan 1 16:20:19 PST 2011
On 02.01.2011 1:22, Robert Clipsham wrote:
> Having seen a post by Peter Alexander (in Re: D for game development),
> mentioning some of the issues he's hit I thought I'd post this. I've
> been in his shoes (every other time I use D it seems), and feel I
> should ask - who here uses D, and to what extent?
>
I started using it precisely for a hobby game project with a couple of
friends. The project itself was soon abandoned due to lack of
time/interest from most of its designers. Yet I decided to publish and
maintain a port of DMDscript in D2, which would have been used as
scripting engine. It's 27 KLOC as by wc *.d, but, yes, it's a very
conservative D. I found two major bugs (both memory corruption) and
still don't have time to narrow them down. One is somehow related to
built-in AA, the other about throwing object not derived from Throwable.
Workaround for the second one was trivial, as for the first one, I just
use David Simcha's RandAA instead.
While the latest game techdemo is only 3kloc, all in more modern D2 with
bells and whistles, because I also wanted to experiment with D2 features
. It was written in days of dmd 2.40-2.41 with LRU array append bugs
and such, and I faced only some minor issues. The closest thing to
blocker was http://d.puremagic.com/issues/show_bug.cgi?id=4481, but it
has easy workaround. Besides, I can't reproduce it with latest dmd
(maybe I should close it ).
> I'm mostly interested in those of you with 1000 Line plus projects in
> D, as that's when I've found I start hitting issues.
>
> Just to clarify, for those D purists among you... I'm not trolling,
> just curious (I wouldn't normally have asked, but now I know I'm not
> paranoid and the only one having problems, I thought I'd ask).
>
My recipe with D2 for now :
- stay away form inout & use immutability only with built-in types
- use malloc & emplace for big memory blocks
- don't push GC too hard, allocate only when it's really necessary (no
Java style new-new-new)
- CTFE still has a long road to catch up with the rest, don't expect too
much of it
- no *heavy* reliance on static introspection, and auto-magic things
like array ops
So far, works just fine.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list