D as a Better C

Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Aug 29 17:35:14 PDT 2017


On Wednesday, 30 August 2017 at 00:29:19 UTC, Parke wrote:
> The above D code yields 445,187 bytes when compiled with 
> -release -betterC.
> DMD64 D Compiler 2.075.0-b2 on Linux on x86-64.

-betterC does virtually nothing on that version of dmd...

> But my original question was about what you (Kagamin) called
> "intermediate D".  I was trying to understand what 
> "intermediate D"
> is, and whether or not I could use "intermediate D" (whatever 
> it is)
> to produce small(er) executables.

Regular D with a custom runtime library. You can get as small as 
3 KB on Linux (though that is a super bare bones hello world).

But note that if you are distributing several executables you 
might also just use the shared phobos lib too with 
-defaultlib=libphobos2.so on Linux.


More information about the Digitalmars-d-announce mailing list