Live data from Hacker News

D Programming Language

dlang.org

101–110 of 278 posts

Re: D Programming Language

#101

Earlier quoted context omitted.

> Do you know the joke with "I'll repeat the joke to you until you understand it?". Nope. That's not a joke. That's not funny. > That's why some things get reposted and upvoted. In hope of getting someone else to understand them. No, they get reposted and upvoted by sock accounts in hope that someone will finally be interested in a 30 year old programming language. > By the way, do you complain about sock accounts wh…

You're harsh but that's OK. There is a lot of truth in what you're saying. I really wish people would quit downvoting everything they disagree with. HN would be 100x better if both the downvote and flag buttons were removed. To me, a C guy, the focus on garbage collection is a turn-off. I'm aware that D can work without it, but it's unclear how much of the standard library etc works fine with no garbage collection. T…

I'm not sure how I'm being harsh. It's literally a somewhat well known programming language being reposted for the 100th time or something silly like that. I'm literally just pointing out the truth and it's almost certainly the main poster downvoting things.

Re: D Programming Language

#102

Earlier quoted context omitted.

One feature of D that i really wish other languages would adopt (not sure about Rust but i also think it lacks it, though if it has it to a similar extent as D it might be the reason i check it again more seriously) is the metaprogramming and compile-time code evaluation features it has (IIRC you can use most of the language during compile time as it runs in a bytecode VM), down to even having functions that generate…

Arguably, most of the metaprogramming in D is done with templates and it comes with all the flaws of templates in C++. The error messages are long and it's hard to decipher what exactly went wrong (static asserts help a lot for this, when they actually exist). IDE support is non-existent after a certain point because IDE can't reason about code that doesn't exist yet. And code gets less self-documenting because it's…

I'd say D's template error messages are much better than C++'s, because D prints the instantiation stack with exact locations in the code and the whole message is just more concise. In C++, it just prints a bunch of gibberish, and you're basically left guessing.

Re: D Programming Language

#103
post #58
post #51

I often see people lament the lack of popularity for D in comparison to Rust. I've always been curios about D as I like a lot of what Rust does, but never found the time to deep dive and would appreciate someone whetting my appetite. Are there technical reasons that Rust took off and D didn't? What are some advantages of D over Rust (and vice versa)?

More like the companies that jumped into D versus Rust, D only had Facebook and Remedy Games toy a bit with it. Many of us believe on automatic memory management for systems programming, having used quite a few in such scenarios, so that is already one thing that D does better than Rust. There is the GC phobia, mostly by folks that don't get not all GCs were born alike, and just like you need to pick and chose your m…

> Many of us believe on automatic memory management for systems programming

The problem is the term "systems programming". For some, it's kernels and device drivers. For some, it's embedded real-time systems. For some, it's databases, game engines, compilers, language run-times, whatever.

There is no GC that could possibly handle all these use-cases.

Re: D Programming Language

#104

I remember the creator of D programming Language replying to me on HN on one of my posts! https://news.ycombinator.com/item?id=46261452

Walter's a regular on HN.

> This very post is probably his too, under an alt :)

The probability of that is virtually zero. Walter is a principled person, has better things to do, and his writing style is vastly different from the OP's.

Re: D Programming Language

#106
post #85
post #51

I often see people lament the lack of popularity for D in comparison to Rust. I've always been curios about D as I like a lot of what Rust does, but never found the time to deep dive and would appreciate someone whetting my appetite. Are there technical reasons that Rust took off and D didn't? What are some advantages of D over Rust (and vice versa)?

> Are there technical reasons that Rust took off and D didn't? As someone who considered it back then when it actually stood a chance to become the next big thing, from what I remember, the whole ecosystem was just too confusing and simply didn't look stable and reliable enough to build upon long-term. A few examples: * The compiler situation: The official compiler was not yet FOSS and other compilers were not availa…

How many people were working on the core compiler/language at the time versus Rust? This could explain it.

Re: D Programming Language

#107

IMHO D just missed the mark with the GC in core. It was released in a time where a replacement for C++ was sorely needed, and it tried to position itself as that (obvious from the name). But by including the GC/runtime it went into a category with C# and Java which are much better options if you're fine with shipping a runtime and GC. Eventually Go showed up to crowd out this space even further. Meanwhile in the C/C+…

FIl-C, the new memory-safe C/C++ compiler actually achieved that through introducing a GC, with that in mind I'd say D was kind of a misunderstood prodigy in retrospect.

Re: D Programming Language

#108
post #103
post #58

Earlier quoted context omitted.

More like the companies that jumped into D versus Rust, D only had Facebook and Remedy Games toy a bit with it. Many of us believe on automatic memory management for systems programming, having used quite a few in such scenarios, so that is already one thing that D does better than Rust. There is the GC phobia, mostly by folks that don't get not all GCs were born alike, and just like you need to pick and chose your m…

> Many of us believe on automatic memory management for systems programming The problem is the term "systems programming". For some, it's kernels and device drivers. For some, it's embedded real-time systems. For some, it's databases, game engines, compilers, language run-times, whatever. There is no GC that could possibly handle all these use-cases.

But there could be a smoother path between having a GC and having no GC.

Right now, you'd have to switch languages.

But in a Great Language you'd just have to refactor some code.

Re: D Programming Language

#109

IMHO D just missed the mark with the GC in core. It was released in a time where a replacement for C++ was sorely needed, and it tried to position itself as that (obvious from the name). But by including the GC/runtime it went into a category with C# and Java which are much better options if you're fine with shipping a runtime and GC. Eventually Go showed up to crowd out this space even further. Meanwhile in the C/C+…

I'd rather say that the GC is the superpower of the language. It allows you to quickly prototype without focusing too much on performance, but it also allows you to come back to the exact same piece of code and rewrite it using malloc at any time. C# or Java don't have this, nor can they compile C code and seamlessly interoperate with it — but in D, this is effortless.

Furthermore, if you dig deeper, you'll find that D offers far greater control over its garbage collector than any other high-level language, to the point that you can eagerly free chunks of allocated memory, minimizing or eliminating garbage collector stops where it matters.

Post reply on HN