Live data from Hacker News

Why I Like D

aradaelli.com

81–90 of 134 posts

Re: Why I Like D

#82
post #41

That's what she said! On a more serious note it's cool to see the languages creator quite frequently on HN - it is the reason I took a look at it a while ago :)

The D test suite takes too long to run, so I wind up here.

Test suites are my bread and butter! Happy to help contribute if you can point me in the right direction - it’s be a nice way to play with D a little more.

Re: Why I Like D

#83

Earlier quoted context omitted.

Someone else made a really good point about hype today: 'One of the dumbest lessons I’ve learned in my career is that you should never disregard something that has hype behind it, even if you don’t think the tech makes sense. [0] Most “tech adoption” problems are really human coordination problems. Hype solves those. It doesn’t matter if you have a better solution, or that you think the proposed solution is stupid. […

> you should never disregard something that has hype behind it Do you have an opinion on how this sentiment applies to blockchain tech? I’m not trolling, I think the sentiment is interesting and blockchain tech seems obviously relevant to that sentiment.

You should check out the tweet linked above. Matthew Green is talking about NFTs.

Re: Why I Like D

#84
I started learning D in 2012 and will echo that Andrei's book is great, and imo one of the most entertaining and informational technical books I've read. The D forum was a great example of dogfooding and the people seemed nice when I would post things.

But, I think one of the things that people seemed very happy about feature-wise that started to turn me off the language was UFCS. I don't deny that it makes the written code look more elegant but I think to me it existed as a net negative for other people who are unfamiliar with the code they are reading. There was an example someone gave years ago on reddit that was supposed to convey how clean the code to solve the problem was but it included an UFCS expression of the form 'a.b!c.d' which was sans-UFCS 'd(b!c(a))'. Trying to determine which reordering the compile would going to eventually choose seemed like more work than should be necessary for simple expression like that.

Having said all that it still might be a good choice for certain development environments and I should see whether there's a second edition of TDPL.

Re: Why I Like D

#85
post #84

I started learning D in 2012 and will echo that Andrei's book is great, and imo one of the most entertaining and informational technical books I've read. The D forum was a great example of dogfooding and the people seemed nice when I would post things. But, I think one of the things that people seemed very happy about feature-wise that started to turn me off the language was UFCS. I don't deny that it makes the writt…

UFCS is one of the most popular features. It's utility is in extending the functionality of a struct without adding member functions that would get private access, but don't need private access.

It helps keep structs small and simple, rather than becoming kitchen sinks.

Re: Why I Like D

#87

Earlier quoted context omitted.

Still wondering why don't people like D more after all these years it's been there.

Probabaly lack of killer application. If you released super popular whatever (game engine, embedded platform, 3d design software) that uses D as its customization language suddenly a lot more people would have a good reason to learn D.

The largest-scale usage of D that I have personally seen is a AAA game studio who had an in-house 3D-engine in C++, and chose to write plugins and game logic in D because of easy integration and hot-swappability. AFAIK worked out well for them.

Re: Why I Like D

#88
post #58

Earlier quoted context omitted.

The library looks impressive, but I dunno about that sales pitch: isn't "more principled than C++ templates"… a pretty low bar? And isn't "more practical than Template Haskell"… also a pretty low bar? I would have asked the same rhetorical question of Scala macros a couple years back, but the Scala 3 macro redesign is indeed pretty nice.

While the design D picked for templates looks (and is) straightforward, it wasn't obvious. It's only obvious in retrospect (which is something a good design aspires to, like putting an eraser on the other end of the pencil).

I agree. That one can e.g. lift every binary operator at once with just a few lines of code makes even python overloading feel heavy—but readers can still understand it easily.

My point isn't that "D doesn't meet that bar", but that the GP picked strange points of comparison: the steelman argument for C++ templates would focus on power (e.g. Eigen) instead of principles, and those for Template Haskell on safety instead of practicality. And of course, no macro comparison would be complete without gesturing vaguely in the direction of Lisp while muttering something about parentheses.

It's like the "Always Be Closing" speech in Glengarry Glen Ross: Dlang macros as John Travolta truly do kick ass in that scene—but why not have Al Pacino there to represent as top dog of the local branch?

Re: Why I Like D

#89
post #84

I started learning D in 2012 and will echo that Andrei's book is great, and imo one of the most entertaining and informational technical books I've read. The D forum was a great example of dogfooding and the people seemed nice when I would post things. But, I think one of the things that people seemed very happy about feature-wise that started to turn me off the language was UFCS. I don't deny that it makes the writt…

UFCS is one of the most popular features. It's utility is in extending the functionality of a struct without adding member functions that would get private access, but don't need private access. It helps keep structs small and simple, rather than becoming kitchen sinks.

I don't disagree that it can be useful (eg. from one of the other projects mentioned in the thread: https://github.com/Netflix/vectorflow/blob/master/src/vector...), and I definitely saw plenty of people that liked it. I think it existed in the same realm as a feature like lisp macros which are incredibly useful but when overused can turn the code into an inscrutable mess. The question for me was always how much the community would use or overuse them. When talking with other people it seemed like their own use of UFCS was obvious, but then again they wrote the code so of course they were going to understand it.

Without knowing any of the associated types and members how many interpretations could the prior expression 'a.b!c.d' have with UFCS and parens-less calling conventions (and any other feature that might contribute to different semantics)?

  b!(c.d)(a)
  b!(d(c))(a)
  d(b!c(a))
  d(a.b!c)
Might be more? Don't get me wrong I see the benefit. The vectorflow example I think is a good use case thought because it allows a more natural conceptualization of object -> member access -> conversion rather than having to call to!ulong(W.length) which forces the reader to start with the (pending) conversion. You get this same dataflow/conceptualization benefit in threading macros in clojure (->, ->>, etc).

Anyway, thank you for all the work you've done.

Re: Why I Like D

#90
post #70

Earlier quoted context omitted.

Partial aside, BetterC sounds a lot like Zig and Andrew Kelley moved to Oregon a year or two ago. Have you talked with Andrew? Funny that two of the language creators in the space are so close to each other on Earth. I'd love to listen to you two discuss D, BetterC and Zig and C.

I met him at Handmade Seattle last Nov. He's a good guy.

Wonderful!
Post reply on HN