Why D is not popular enough?
Chris Wright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Aug 12 07:24:52 PDT 2016
On Fri, 12 Aug 2016 09:38:13 +0000, Guillaume Piolat wrote:
> From the best of my knowledge you cannot do these things in in
> C++:
>
> https://p0nce.github.io/d-idioms/#Precomputed-tables-at-compile-time-
through-CTFE
You can use an external tool at build time to do this, but it's awkward.
(DMD, when it was C++-based, used that technique to generate a few
things.)
> https://p0nce.github.io/d-idioms/#Embed-a-dynamic-library-in-an-
executable
You need a resources script for it with MSVC++. If you're building an ELF
executable, you can use `objcopy(1)` to convert a data file into an
object file containing static data.
Which is, I feel, the story of life using D vs C++. You can get it done
in C++, but it might take some external tools, it's going to be awkward,
and it's going to be different on every platform.
More information about the Digitalmars-d
mailing list