It is the year 2020: why should I use / learn D?

Nicholas Wilson iamthewilsonator at hotmail.com
Fri Nov 23 11:06:17 UTC 2018


On Friday, 23 November 2018 at 10:25:57 UTC, Joakim wrote:
> On Wednesday, 21 November 2018 at 14:38:07 UTC, Chris wrote:
>> I watched the whole keynote. Well, to begin with it's still a 
>> very young language (not 18+ years old) and keeps getting 
>> better and better. Things that were a bit tricky just recently 
>> are now much easier and part and parcel of the language. It 
>> shows that they listen to their user base and make things as 
>> easy as possible. In many ways it's already miles ahead of D 
>> in terms of what you need as a programmer to get things done 
>> fast, e.g. tooling, interop, multi-platform, handling of 
>> deprecations etc. There are useful features (I already knew 
>> from D) that make life easier (e.g. lambdas).
>
> You would expect that from a language coming out of a tools 
> provider. I thought it was interesting how he mentioned that 
> one of the main reasons he didn't want meta-programming in 
> Kotlin is because it's extremely hard for an IDE like theirs to 
> deal with.
>
> That's potentially one of the big advantages of D's 
> string-based mixin approach: the IDE can tell the compiler to 
> dump them to files and then just treat them as regular D 
> source, though I don't know that anybody is doing that yet.

-debug-mixin=file was recently added so that should be possible.
I'd bet money that Manu will pester Rainer for it at some point :)

>> And as for meta-programming (I knew this would come up ;)), I 
>> don't really miss it / use it anymore. There was only one case 
>> where I said it would have been nice, but it wasn't _really_ 
>> necessary (it was just an old D habit, really). In fact, 
>> meta-programming in D can cause a lot of unnecessary headaches 
>> (cryptic compiler warnings galore, code breakage) and stall 
>> the whole development process unnecessarily - and often for 
>> very little extra value. It says a lot that Adam D. Ruppe 
>> stated that if you don't want your code to break, use 
>> non-idiomatic D. So what's the point of it then? It's just 
>> absurd.
>
> It's probably D's biggest differentiator, the one feature that 
> people always say blows their mind when they use D, both from 
> its power and relative ease of use. Of course, it's not for 
> everyone, just like lisp macros, so I asked you what you 
> thought, without saying "Kotlin sucks" or whatever.

What I would really interesting from that they reckoned people 
would write compiler plugins as a substitute. Having dealt with 
both, I can say that doing what you can in the library is 
immensely easier. I've seen what clang does to support CUDA: it 
ain't pretty or simple. Obviously not all thing are going to be 
that complicated, but I'm not particularly convinced that that 
will be a common thing to do.





More information about the Digitalmars-d mailing list