Live data from Hacker News

Driving with D

dlang.org

21–30 of 186 posts

Re: Driving with D

#21
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

Not different enough to be worth switching from Java/C++ with their much bigger and more established communities. This was especially true earlier in it's history when it required GC. Now it doesn't, but it has to compete with Rust which can also offer memory safety.

> Not different enough to be worth switching from Java/C++ with their much bigger and more established communities.

Companies using Java or C++ don't switch because a language is "sufficiently different". I've been involved in programming language discussions for decades and I've never heard of a company switching to a language because it was different from what they were already using, though being too different is a common reason for not switching.

{For those not aware, D has intentionally kept compatibility with C as a priority, to the point that you can set a compiler flag and restrict yourself to "betterC". You can translate C code to D without making many changes to it.}

Re: Driving with D

#22
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

The things that make D special - culturally even - are quite niche so while it's been extremely profitable for many who do use D, D is sometimes not an easy sell in the sense that the things that D makes easy are not things you encounter in the first few minutes of using a language.

Also: Marketing, a lot decisions are made based on nothing, we're too modest (to be blunt).

Re: Driving with D

#23
post #14

Earlier quoted context omitted.

Challenging to overcome languages like C++, Rust, Java, and C#. D seems to sit somewhere in between, a better C++, but with (optional) GC. The thing is, Java and C# are already making strides into that space.

D was released 9 years before Rust, making it unlikely that rust had much influence on D adoption.

This is Hacker News.

Re: Driving with D

#24

Earlier quoted context omitted.

Not different enough to be worth switching from Java/C++ with their much bigger and more established communities. This was especially true earlier in it's history when it required GC. Now it doesn't, but it has to compete with Rust which can also offer memory safety.

> Not different enough to be worth switching from Java/C++ with their much bigger and more established communities. Companies using Java or C++ don't switch because a language is "sufficiently different". I've been involved in programming language discussions for decades and I've never heard of a company switching to a language because it was different from what they were already using, though being too different is…

The D compiler speaks C11 now, it'll be ready for prime time in two or three releases based on speaking to Iain and Walter.

Re: Driving with D

#25
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

Honestly, I believe it is much more about marketing than one might expect.

Ha, only unexpected if you haven't been watching how every other language adoption goes. Otherwise I agree. :)

Re: Driving with D

#26
post #16
post #13

Hi, I'm the author of the article. Feel free to ask any questions you may have. I have to go to bed, I have work in about 4 hours, so I'll reply when I can.

This is what I love HN for. Every now and then there's a submission like this that makes me go: "How do you even...". That being said, is there maybe somewhere a more thorough write-up about the whole thing? You know, with more in-depth technical details, gotchas, and so on? I'm sure many people would enjoy reading that! Thanks for posting!

Thank you so much for the kind words :)

Sorry, no. I don't have a blog or website or anything. The closest thing I have to a devlog are some posts in a private Facebook group dedicated to the Holden Commodore.

I think this project is almost 12 months old now.

Re: Driving with D

#27
post #2

Any reasons D never caught on more? No big tech company anchor behind it?

As far as I know D's original design strategy, was to be a simpler to use C++ with a GC, but with the same expressive power

Over time, this proved to be a bad strategy, C++ key strength became RAII (deterministic memory management), so the GC became a failed strategy

The maintainers tried to move in different directions, adding manually memory management, making the GC optional, moved D to be a C replacement, with the -betterc compiling option, and many other tweaks and features added overtime, but nothing really caught on

Re: Driving with D

#28
post #18
post #15

UFCS example uses units, which looks neat, but assigns injectorWidth to a variable injectorTime, which seems wrong?

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

That's understandable. Not for everyone.

Different situation, but I do admit when I first got into D I was wary of the UFCS feature and I avoided it, too.

Over time it felt a bit more natural and I began to appreciate it.

Re: Driving with D

#29
post #7

Earlier quoted context omitted.

Challenging to overcome languages like C++, Rust, Java, and C#. D seems to sit somewhere in between, a better C++, but with (optional) GC. The thing is, Java and C# are already making strides into that space.

I am curious to see where Java are C# are making progress towards optional GC. This specific article talks about using No GC aka "betterC". D has GC by default; the use of GC is convenient and mainstream as most popular languages show - Java/C#/Python etc. What D gives is the unique ability to do No GC programming for the cases where GC is not desirable. Very few languages offer this capability. Zig is interesting in…

If one sets the requirement of having manual memory management in a mixed language, then:

1. either they don't use any library, including the standard one,

2. or the (standard) libraries must be written in both manual and managed memory management versions.

Additionally, the language must include extra syntax for memory allocation and access. This doesn't event include safety-related semantics, like Rust, which would be very hard to bolt-in (language-wise).

I hardly see any advantage in Java/C# having this functionality; Oracle is actually putting lots of effort into improving their garbage collectors. Java does actually have manual memory management (through Unsafe), although it's rudimentary; for the reason mentioned, I doubt it will ever be improved/expanded.

Re: Driving with D

#30
post #18
post #15

UFCS example uses units, which looks neat, but assigns injectorWidth to a variable injectorTime, which seems wrong?

I use D every day at work (inherited codebase) and the UFCS bothers me to no end. I try not to use it.

There are "bad" uses of UFCS, and good ones (sometimes depending on preference). For example, I hate code like `1.writeln`.

The major feature that it provides is pipelining (as shown in the article)

Post reply on HN