Live data from Hacker News

D Programming Language

dlang.org

91–100 of 278 posts

Re: D Programming Language

#91
post #36
post #17

Earlier quoted context omitted.

Genuinely curious as I'm relatively new compared to the time of inception of this language. Can you cite the reasons why people didn't choose D?

It was competing with C and Java when it came out. People who like C will not use a language with garbage collection, even one that allows you to not use it. Against Java, it was a losing battle due to Java being backed by a giant (Sun , then Oracle) and basically taking the world by storm. Then there were also license problems in early versions of D, and two incompatible and competing standard libraries dividing the…

Can you explain what BetterC is, and what it is used for?

I think there's also something called ImportC. Not sure what that is either.

I read the D blog sometimes, and have written some programs in D, but am not quite clear about these two terms.

Re: D Programming Language

#92
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)?

D and Rust are on the opposite sides at dealing with memory safety. Rust ensures safety by constantly making you think about memory with its highly sophisticated compile-time checks. D, on the other hand, offers you to either employ a GC and forget about (almost) all memory-safety concerns or a block scoped opt-out with cowboy-style manual memory management. D retains object-oriented programming but also allows funct…

> block scoped opt-out with cowboy-style manual memory management

Is this a Walter Bright alt? I've seen him use the cowboy programmer term a few times on the forum before.

Re: D Programming Language

#93

What can D do other languages can't? Say your starting a new Staff Engineer or Tech Lead job. What gets you to convince a CTO that we need to have a team learn D ? On the flip side, where are the 200k base salary D positions. Get me an interview in 2 months and I'll drop 10 hours a week into learning

Well, I would say it's more like glasses - you can't convince those who don't wear them, and you don't need to convince those who need them either.

Re: D Programming Language

#94
post #55

Earlier quoted context omitted.

Do you know the joke with "I'll repeat the joke to you until you understand it?". That's why some things get reposted and upvoted. In hope of getting someone else to understand them. By the way, do you complain about sock accounts when yet another "Here is this problem, and by the way we sell a product that claims to solve it" gets upvoted?

> 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. That hasn't been explained, that I saw at least.

The biggest problem however is the bootstrapping requirement, which is annoyingly difficult or too involved. (See explanation in my other post.)

Re: D Programming Language

#95
post #27

Earlier quoted context omitted.

> Yeah, that is why carpenters are still around and no one buys Ikea. I'm sorry, what? Are you suggesting that Ikea made carpenters obsolete? It's been less than 6 months since last I had a professional carpenter do work in my house. He seemed very real. And charged very real prices. This despite the fact that I've got lots of Ikea stuff.

Compared to before, not a lot of carpenters/furniture makers are left. This is due to automation.

> Compared to before, not a lot of carpenters/furniture makers are left.

Which is it? Carpenters or furniture makers? Because the two have nothing in common beyond the fact that both professions primarily work with wood. The former has been unaffected by automation – or even might plausibly have more demand due to the overall economic activity caused by automation! The latter certainly has been greatly affected.

The fact that people all over the thread are mixing up the two is mindboggling. Is there a language issue or something?

Re: D Programming Language

#96

Earlier quoted context omitted.

> that is why carpenters are still around and no one buys Ikea The irony in this statement is hilarious, and perfectly sums up the reality of the situation IMO. For anyone who doesn't understand the irony: a carpenter is someone who makes things like houses, out of wood. They absolutely still fucking exist. Industrialised furniture such as IKEA sells has reduced the reliance on a workforce of cabinet makers - people…

I think you have misunderstood what a carpenter is. A carpenter is someone who makes wooden furniture (among other things).

> I think you have misunderstood what a carpenter is. A carpenter is someone who makes wooden furniture (among other things).

I think _you_ have misunderstood what a carpenter is. At least where I live, you might get a carpenter to erect the wood framing for a house. Or build a wooden staircase. Or erect a drywall. I'm sure most carpenters worth their salt could plausibly also make wooden furniture, at an exorbitant cost, but it's not at all what they do.

I sanity checked with Wiktionary, and it agrees: "A person skilled at carpentry, the trade of cutting and joining timber in order to construct buildings or other structures."

Re: D Programming Language

#97

Earlier quoted context omitted.

D and Rust are on the opposite sides at dealing with memory safety. Rust ensures safety by constantly making you think about memory with its highly sophisticated compile-time checks. D, on the other hand, offers you to either employ a GC and forget about (almost) all memory-safety concerns or a block scoped opt-out with cowboy-style manual memory management. D retains object-oriented programming but also allows funct…

> block scoped opt-out with cowboy-style manual memory management Is this a Walter Bright alt? I've seen him use the cowboy programmer term a few times on the forum before.

Yeah, I just saw his posts too and picked up the term :)

Re: D Programming Language

#98
post #36
post #17

Earlier quoted context omitted.

Genuinely curious as I'm relatively new compared to the time of inception of this language. Can you cite the reasons why people didn't choose D?

It was competing with C and Java when it came out. People who like C will not use a language with garbage collection, even one that allows you to not use it. Against Java, it was a losing battle due to Java being backed by a giant (Sun , then Oracle) and basically taking the world by storm. Then there were also license problems in early versions of D, and two incompatible and competing standard libraries dividing the…

I like and use D but Nim has better metaprogramming capabilities (but D's templates are top-notch except for the error message cascades). (And Zig's metaprogramming is severely hobbled by Andrew's hatred of macros, mixins, and anything else that smells of code generation.)

Re: D Programming Language

#99
post #36

Earlier quoted context omitted.

It was competing with C and Java when it came out. People who like C will not use a language with garbage collection, even one that allows you to not use it. Against Java, it was a losing battle due to Java being backed by a giant (Sun , then Oracle) and basically taking the world by storm. Then there were also license problems in early versions of D, and two incompatible and competing standard libraries dividing the…

Can you explain what BetterC is, and what it is used for? I think there's also something called ImportC. Not sure what that is either. I read the D blog sometimes, and have written some programs in D, but am not quite clear about these two terms.

https://dlang.org/spec/betterc.html

https://dlang.org/spec/importc.html

> Note: ImportC and BetterC are very different. ImportC is an actual C compiler. BetterC is a subset of D that relies only on the existence of the C Standard library. BetterC code can be linked with ImportC code, too.

D contains an actual C compiler because Walter Bright wrote one long ago and then incorporated it into D.

Zig also contains an actual C compiler, based on clang, and has a @cImport directive.

Re: D Programming Language

#100
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++ replacement camp there was nothing credible until Rust showed up, and nowadays I think Zig is what D wanted to be with more momentum behind it.

Still kind of salty about the directions they took because we could have had a viable C++ alternative way earlier - I remember getting excited about the language a lifetime ago :D

Post reply on HN