Why is D unpopular?
Adam D Ruppe
destructionator at gmail.com
Thu May 12 13:34:02 UTC 2022
On Thursday, 12 May 2022 at 03:43:50 UTC, Walter Bright wrote:
> You should mention that ImportC supports C constructs that are
> not expressible in D, such as _Generic and bitfields.
I've been using D for 15 years across a variety of applications,
including making drivers to interface with esoteric hardware.
Those have never been useful.
C bitfields are useless even in C for hardware work, unless you
lock into proprietary compiler, since the layout is undefined.
You're much better off just taking out the spec sheet and using
the | and & operators.
> C interoperability is a major barrier to using D.
D is very good at C interoperability. You have a bad habit of
spreading misinformation about D. Why would someone use it if its
own creator thinks it sucks?
But in reality, D is a very good language that makes accessing C
code very easy.
> The trouble comes when those header files change, you've got to
> figure out what changed and update those hand-translated files.
That's not really hard when they change in one place. You can do
cherry-pick merge and be done with it in little time. Stable APIs
are a very small investment with big returns in D.
It is hard though when you are trying to match the version on the
user's computer, since dstep's 99% translation may not be good
enough and a pre-made packaged thing may not match.
This is where importC can win - matching what's on the build
system automatically. It isn't there yet though.
More information about the Digitalmars-d
mailing list