Linking D code into existing C programs
Kagamin via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 28 01:02:08 PDT 2016
On Monday, 26 September 2016 at 23:47:45 UTC, Jonathan M Davis
wrote:
> Well, in this case, you're basically trying to use D without
> druntime, which generally is a total non-starter anyway. If
> you're not using druntime, then you might as well be using C,
> since you're not even going to get basic stuff like array
> bounds checking.
Ugh, no, you can't use C as well as D. Dare I say, C is only for
maintenance of legacy code; if you have a choice, use D, it's
just better. Non-starters are GC and exceptions. Asserts and
bounds checking are one-liners (and for really minimal code even
they are not needed), string switch is another couple of lines
and you get the type system and all the compile time capabilities
of D that you're never going to have in C (that modern
convenience and modelling power).
More information about the Digitalmars-d
mailing list