System programming in D (Was: The God Language)

Iain Buclaw ibuclaw at ubuntu.com
Thu Jan 5 14:03:01 PST 2012


On 5 January 2012 16:49, Manu <turkeyman at gmail.com> wrote:
>> D is not a compiler, it is a language. Furthermore it is not true that
>> DMDs backend is rubbish and there are already more backends than just the
>> DMC backend.
>
>
> Sorry, I was generalising a little general in that claim. And where I say
> 'rubbish', I was drawing comparison to the maturity of C compilers for x86,
> which STILL have trouble and make lots of mistakes with centuries of man
> hours of work.
> DMD has inferior code gen (there was a post last night comparing some
> disassemblies of trivial programs with GDC), will probably never rival GCC,
> that's fine, it's a reference, I get that.
> But to say that using GDC will magically fix code gen is also false. I'm not
> familiar with the GCC code, so I may be wrong, but my understanding is that
> there is frontend work, and frontend-GCC glue work that will allow for back
> end optimisation (which GCC can do quite well) to work properly. This is
> still a lot of work for a small OSS team.
> I also wonder if the D language provides some opportunities for optimisation
> that aren't expressible in other languages, and therefore may not already
> have an expression in the GCC back end... so I can imagine some of future
> optimisations frequently discussed in this forum won't just magically appear
> with GCC/LLVM maturity. I can't imagine Iain and co extending the GCC back
> end to support some obscure D optimisations happening any time soon.
>

Actually, it's just me. ;)

So far I have come across no D optimisations that aren't supported in
GCC.  Infact, most of the time I find myself thinking of how I can use
obscure GCC optimisation X to improve D.    One example is an
interesting feature of Fortran, though written with C++ in mind. Seems
like something that could be right up D's street.

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=147822

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list