Live data from Hacker News

The reference D compiler is now open source

forum.dlang.org

231–240 of 313 posts

Re: The reference D compiler is now open source

#231

Earlier quoted context omitted.

LDC dev here. All the credit for this goes to Ilya Yaroshenko for the expertly crafted implementation and the LLVM developers for efficient low-level code generation (inlining, register allocation and so on, and in some places auto-vectorization). LDC only needs to make sure not to "mess up" things too much. D does play a significant role in this achievement, though – D's very powerful yet easy to use features for ge…

That's helpful, thanks! I definitely appreciate the power of generics, especially when you can to generics over values instead of just types. But I'm having trouble seeing the value of the compile-time introspection, for the most part it doesn't seem to give you much more power than generics do. Could you give me an example of the "killer feature" introspection gives over generics? Bonus points if you can compare it…

Many things, although introspection works glove in hand with generics. Below os a non-exhaustive list.

You can 'Write once - automate everywhere' all the boilerplate. See https://github.com/kaleidicassociates/excel-d/ , for an example of automating the interaction between D and Excel. I am in the process of doing something similar for OpenCL and CUDA and will be presenting it at Dconf.

You can make at compile time (additional) fast paths by checking to see if a type (or symbol or whatever else) provides a fast primitive to accelerate your algorithm. e.g. if Foo implements fastfoo use that otherwise fallback to a general algorithm.

See also Andrei Alexandrescu's 2016(15?) talk (IIRC the relevant section is about half way through https://www.youtube.com/watch?v=4oDK91E3VKs).

Re: The reference D compiler is now open source

#232
post #153

And best of all, it's the Boost license! Here it is: https://github.com/dlang/dmd/pull/6680

Does that mean that the backend can be rewritten in D at some point? Speaking of which, there could be a standard D intermediate language (Or is there one? I've never at the glue code in between the frontend and backend/s)

All an intermediate language does is slow the compile speed down.

Re: The reference D compiler is now open source

#233

Earlier quoted context omitted.

I think you answered yourself why D is not more popular with the "cool kids". C++/Java/C# are overengineered, verbose, horrible languages to use. Java is a bastard of C++, and C# is the better looking bastard. Yes we use them, and even like them in a weird Stockholm Syndrome way, but they're not fun to work with. We use them because we need them, not because we enjoy them. Disclaimer: the personal pronoun "we" as use…

Java is very simple and has, hands down, the best tooling of any major language out today. That is why it is the most popular. Java isn't my favorite language, but even I can remove my blinders enough to see its strengths.

Say what?

The words that come to mind when I think of Java tooling is certainly not "best". More like "Bloated, slow, too-fscking-much-XML"

Re: The reference D compiler is now open source

#234
post #233

Earlier quoted context omitted.

Java is very simple and has, hands down, the best tooling of any major language out today. That is why it is the most popular. Java isn't my favorite language, but even I can remove my blinders enough to see its strengths.

Say what? The words that come to mind when I think of Java tooling is certainly not "best". More like "Bloated, slow, too-fscking-much-XML"

Maybe you're a better programmer than you are a configure-r. But its tooling is insanely, insanely good.

Re: The reference D compiler is now open source

#235

Earlier quoted context omitted.

FORTRAN users beg to differ. The horse they backed will be here until the lights go out because it probably is used to power the lights at some level.

Yes it most certainly is. All the power system applications written in the 60's and 70's were done so in Fortran as they had to be fast and run numerical analysis on massive matrices. However, a lot of it is being rewritten in more modern languages like C++ or C depending on the application.

> However, a lot of it is being rewritten in more modern languages like C++ or C depending on the application.

And a lot of it is embedding FORTRAN or COBOL in the new pretty C/++.

New skin, same system.

Re: The reference D compiler is now open source

#236
post #108

Earlier quoted context omitted.

What do you consider as "fad languages"?

Not going to start a flame war. Everyone has their opinions, However there are languages that come and go, and then are swift to become popular, but then are left to rust, because people stopped having smalltalk about them.

I agree except the swift part (I don't even code in Swift). It's impossible for it to die because of iOS unless Apple kills it for something else.

Re: The reference D compiler is now open source

#237

Earlier quoted context omitted.

Not going to start a flame war. Everyone has their opinions, However there are languages that come and go, and then are swift to become popular, but then are left to rust, because people stopped having smalltalk about them.

Go is not going anywhere.

Unfortune, isn't it? We have D, Swift, Rust, Kotlin. Go looks very sad (and borderline ridiculous) compared to these.

Re: The reference D compiler is now open source

#238
post #233

Earlier quoted context omitted.

Java is very simple and has, hands down, the best tooling of any major language out today. That is why it is the most popular. Java isn't my favorite language, but even I can remove my blinders enough to see its strengths.

Say what? The words that come to mind when I think of Java tooling is certainly not "best". More like "Bloated, slow, too-fscking-much-XML"

XML? That's probable Spring. I hate that thing. But Java's tooling for monitoring is crazy good. The benchmarking harness that gives back the assembly code generated for hot code, unmatched on any other non-native language. The editors and how good hinting and auto-complete are, I don't know of another language that integrates so well.

Java really raised the bar on tooling and other languages/platforms have really had to drive hard to get just a close comparable place.

Re: The reference D compiler is now open source

#239
post #156
post #85

Earlier quoted context omitted.

> Why does gc disqualify a language as a system's language? AFAIK a "system programming language" should have deterministic performances, obviously Go hasn't. But different people might define "systems" differently.

I can have non-deterministic performance even when using C. Also if I use Boehm GC with C, does that disqualify C as system language?

Is GC with C mandatory? it is in Go. See the difference? C doesn't come with a GC.

Re: The reference D compiler is now open source

#240

Earlier quoted context omitted.

> Does D have a thing? Probably its most useful feature is rather subtle. It's very easy to express diverse ideas in code in D without having to resort to contortions. It's something people realize after having worked with D for a while. It is not the result of having feature X (you can always find feature X in other languages or a way to make X work), it's the combination of various X's. For example, some algorithms…

I really like how purity in D is so... practical . I like that a for loop is totally allowed in pure code as long as it modifies no data outside the pure block. One of the most annoying things in Haskell was to translate some algorithm that looks very natural in a for loop into some other sort of combination of map or reduce or something even more complicated. (Yes, I know Haskell can also fake for loops more cleanly…

My recollection from the last time I worked with D was that pure could be more complicated and strict than expected when using standard libraries functions, e.g. using trigonometry sets hardware global state, thus impure. I don't remember if there was a good workaround to convey intent of purity despite that.
Post reply on HN