by WalterBright 6 hours ago

> Zig particularly shines: comptime metaprogramming, explicit memory allocators, and best-in-class C interoperability. Not to mention the ongoing work on compilation times

The D programming language shines:

comptime: https://dlang.org/spec/function.html#interpretation

metaprogramming: https://dlang.org/spec/template.html#function-templates

explicit memory allocators: these are easily made, there's nothing special about them, I use them all the time

best-in-class C interoperability: Nothing beats D's ImportC, where you can import a .c file as if it were a module. You can even use ImportC to translate your C code to D! https://dlang.org/spec/importc.html

Performance: same as C and C++

johnfn 4 hours ago | [-2 more]

You should probably say you are the core contributor to D!

WalterBright 3 hours ago | [-1 more]

We are fortunate in having a number of highly competent core D contributors!

johnfn 3 hours ago | [-0 more]

What I meant is that it is proper etiquette to disclose that you are the creator of D.

Fire-Dragon-DoL 5 hours ago | [-12 more]

Why D sees low adoption?

Kapendev 4 hours ago | [-2 more]

Good question, but I don't think this is the place for that conversation :) And I say that as a Dlang fan :)

johnfn 4 hours ago | [-1 more]

Why would a comment suggesting to use D not be the place to have a conversation for why D doesn't see adoption?

Kapendev 4 hours ago | [-0 more]

You and Walter could do that, but this post is about some cool devs and their cool Zig project.

WalterBright 5 hours ago | [-3 more]

We could do a better job at marketing

PedroBatista 4 hours ago | [-2 more]

Build the “killer app” that the audience wants and needs and where D is the best lang to do it and justify the investment in learning yet another lang. I have no idea of what that is and nobody knows, it’s the universal problem of any product/lang/tech. Right place at the right time I guess

WalterBright 3 hours ago | [-1 more]

A killer app can be built in any language.

PedroBatista an hour ago | [-0 more]

Of course it can, but different killer apps for a different crowd. A missile tracking system wouldn't be the kind of application to do in PHP. Wrong app, wrong crowd.

I'm aware of D since it's inception more or less but don't know it very well. I would say D lacks a "bombastic" feature and maybe that's both the reason is not used more but also why is such a good language.

It's not "memory safe" like Rust, yes it's fast but so is C/C++, it doesn't have the "massive parallelism/ always-on" robustness like Erlang. It has a bit of everything which is good and bad.

Being a mid all-arounder is OK in my book, perhaps it's more a matter of some "post-AI" tech startup adopt it and get massive or famous, like Ruby because of the Web 2.0 era or Erlang with the Whatsapp thing.

Maybe D is good the way it is and will always be there.

throwawaymaths 4 hours ago | [-1 more]

too many features. tryhard vibe

WalterBright 4 hours ago | [-0 more]

We're implementing "editions" in order to remove some features that don't deliver enough value.

spiffytech 4 hours ago | [-2 more]

In part, the compiler wasn't fully FOSS until 2017.

WalterBright 3 hours ago | [-1 more]

The gdc and ldc compilers were fully FOSS around 2007.

We were able to get dmd's backend license fixed in 2017.

spiffytech 3 hours ago | [-0 more]

Ah, I stand corrected!

ofalkaed 4 hours ago | [-1 more]

>Nothing beats D's ImportC

What does it offer over Zig's translate-c?

WalterBright 3 hours ago | [-0 more]

D does a pretty good job translating function-like macros, including creating lambdas out of macro expressions like:

    #define X 3+y
I haven't experimented with translate-c to see just what it does, I am going by the description of it which is a bit vague.

ImportC can also import D modules, so C code can access the D code.