Live data from Hacker News

Why I Like D

aradaelli.com

101–110 of 134 posts

Re: Why I Like D

#101

Earlier quoted context omitted.

Wow, and someone else just yesterday was giving D credit for not thrusting everything into the global name space like C does! Yes, two different D modules can declare the same name as public, and they will not conflict with each other.

Apologies if I misworded what it's doing. It wasn't about name clashing, but readability. It's not clear at first glance what functions belong to which imports. As an example: https://tour.dlang.org/ Three imports and what appear to be four unqualified functions from them.

What language are you used to that doesn't do this? I think I would go nuts if I had to always use the fully qualified name for all symbols.

Re: Why I Like D

#102
post #18

Yes, I just wished more people liked D so it got momentum.

I first learned C++ 20+ years ago. While I've appreciated it, I also knew its shortcomings and had been looking for a replacement. D had some missteps along the way that lost some initial traction. I also wouldn't be surprised if timing was a factor with more C++ warts being added while the programming community has learned more lessons along the way that could be applied to the next languages (Go, Rust). As I follow…

the "Split stdlib" thing is about 15 years out of date (and only applied to D1, whose final release was in 2012).

I wish that criticism would go away.

Re: Why I Like D

#103
post #100

Earlier quoted context omitted.

I don't know D and just learning this syntax myself, and I'm genuinely interested in where you feel the smell is because I really like this syntax! For example: I know Ruby, so here is what I'm used to: half.map { |i| i + 1 } I also know Elixir: Enum.map(half, fn i -> i + 1 end) ...and JS, I guess because we have to: half.map(i => i + 1) // It looks just like the Ruby one ...vs whatever the Python version is... I don…

Sorry I should have been more clear. Incrementing every element in an array is much less useful than ".map()" which can execute a function on every element. It just seems like a weirdly specific syntactic sugar... which is a "language smell"... to me

You can use arrays as if they were individual operands, and it will expand out the loop and apply the expression to all the values (and can use optimization/vector tricks if posssible).

e.g.:

arr1[] += arr2[] / 10.0 + 5;

TBH, I don't use this feature much, because I work with ranges more than arrays, which do not have this ability. This feature predates ranges (and the std.algorithm.map function, which can do what you say as well).

Re: Why I Like D

#104

> Go did not have generic types at the time so I excluded it immediately I wonder how many people are missing out on Go for a feature they wouldnt miss 80-90% of the time?

The only way you can be saying this is if you haven't experienced metaprogramming in D. C++ does not compare at all. Generics do not compare at all.

You can take D metaprogramming from my cold dead hands.

Re: Why I Like D

#105

Earlier quoted context omitted.

D programmers have also been in high demand in the industry, because D programmers tend to not need social proof, and tend to be self-educated and self-starters.

Walter, what do you mean by social proof in this context? Wondering if you have a brief example?

Majority of pro D developers are there by word of mouth / hiring "weird" smart people.

Re: Why I Like D

#106
post #82

Earlier quoted context omitted.

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.

https://github.com/dlang/dmd/tree/master/test

I work on D too, feel free to email.

Re: Why I Like D

#107

According to wikipedia: "...was originally released under a custom license, qualifying as source available but not conforming to the open source definition. In 2014..." Which has been a different path other more popular languages took to increase popularity. The standard D2, which is now D, introduced breaking changes and stabilization only came around 2010. Parallel to this, other programming languages became more p…

I originally underestimated the value of Open Source, which was definitely a mistake. Now I do everything in Open Source. The latest was releasing my disassembler, originally written in 1982, under a Boost License. (It may be old, but it disassembles the latest Intel instruction sets.) It's now part of the dmd D compiler. Just throw the -vasm switch, and it'll display the generated code on the console. I see many use…

> latest Intel instruction sets.

I'm impressed with -vasm, but fo the record this isn't strictly true. It supports most everything you'll see day to day but AVX2 (for example) is emphatically not the latest and greatest.

AVX512 adds quite a lot of stuff for example. Entirely new set of mask registers for example.

Even with the VEX prefix Intel did new instructions just recently (VNNI).

As long as it doesn't blow up I think it's fine to not support these, just want to make it clear that if you use (say) TSX via inserting raw bytes in an AsmStatement (which I have done) then the disassembler will not pick it up.

Re: Why I Like D

#108

> Go did not have generic types at the time so I excluded it immediately I wonder how many people are missing out on Go for a feature they wouldnt miss 80-90% of the time?

The only way you can be saying this is if you haven't experienced metaprogramming in D. C++ does not compare at all. Generics do not compare at all. You can take D metaprogramming from my cold dead hands.

If you were in the authors shoes and you disliked C++ templates would you also have written off Go without trying it, though?

No argument on going from D to something else but to not know either and not even try Go is what surprises me.

Re: Why I Like D

#109

According to wikipedia: "...was originally released under a custom license, qualifying as source available but not conforming to the open source definition. In 2014..." Which has been a different path other more popular languages took to increase popularity. The standard D2, which is now D, introduced breaking changes and stabilization only came around 2010. Parallel to this, other programming languages became more p…

They're wrong: the D parts of the compiler were released under the GPL in 2002. What is now called gdc got started shortly thereafter, bolting it on to the gcc backend, creating a fully-GPL D compiler.

This is easy to verify by looking at the archived releases.

Re: Why I Like D

#110

D makes a compelling promise, but it's still ongoing metamorphosis. Changes too rapidly for libraries to take root. Every time I look at it there's a "new, better way" of doing everything so all the tools and libraries are out of date, at all times. And the whole thing doesn't sound so clean and elegant anymore.

> Changes too rapidly for libraries to take root.

I have code that has worked unmodified for many years. The language doesn't change that often.

Post reply on HN