Inherent code performance advantages of D over C?

Adam D. Ruppe destructionator at gmail.com
Thu Dec 12 07:53:37 PST 2013


On Thursday, 12 December 2013 at 12:21:31 UTC, Dicebot wrote:
> I can't find code Adam used to provide minimal d runtime stubs 
> to compile C-like programs but he was forced to use in-line 
> assembly there in few cases. Can't remember details, sorry.

http://arsdnet.net/dcode/minimal.zip (not sure if it still 
compiles on new dmd, I haven't played with it for months and 
druntime is a moving target)

The main inline asm usage was to make system calls on Linux 
without libc or to poke the hardware on bare metal; there isn't a 
lot of it that is strictly necessary.

On Thursday, 12 December 2013 at 11:16:07 UTC, Dicebot wrote:
> But it leaves you with a very
> crippled language that does not even help you in sticking with
> that crippled subset. At this point you really start asking
> yourself - what does this give me over raw C to motivate the
> transition? So far I don't see anything convincing.

There's still some nice benefits, you can use the compile time 
stuff of D, exceptions, classes, custom array types; a lot of the 
language actually works if you spend the time on it. Though i 
never did anything serious with it, I stopped at the proof of 
concept phase.


More information about the Digitalmars-d mailing list