Live data from Hacker News

The reference D compiler is now open source

forum.dlang.org

51–60 of 313 posts

Re: The reference D compiler is now open source

#54
post #39

Earlier quoted context omitted.

There have been fully open source compiler for D for a long time: LDC and GDC.

Yup, but to be fair, they sometimes lack quite a bit behind dmd.

LDC follows dmd pretty closely nowadays. Also this doesn't make an good excuse for not learning the language.

Re: The reference D compiler is now open source

#55
post #17

Earlier quoted context omitted.

D is easier than Rust and safer than C++. That is a valuable point IMHO.

I agree it is valuable. But I still think there are better alternatives now. Depending on your priorities and constraints, OCaml, Go, F#, Scala, and Swift all fit the same description (easier than Rust, safer than C++) and they're in the same realm for performance (slower than C, C++, Rust, etc., but not by much). D could have been there if they had a decade or so with a bigger community.

D certainly has made a few mistakes and having a non-free backend in dmd was one of them. I doubt this could have been avoided though. It was just technical debt, which Symantec now graciously payed off. I have great respect for the Rust people, because it seems they do everything right so far.

I am a sucker for language discussions, so let me explain what my problems are with your suggestions.

Ocaml: No support for parallelism, community is even smaller than D, do they have a package manager, yet?

Go: I like generics/templates. If I throw away type safety, I might as well use Python.

F#: I use Linux. The .NET ecosystem is not strong here.

Scala: I don't like the JVM. Also, the Scala compiler is slow.

Swift: Solid ideas, but held back by Object-C compatibility. I don't build iOS apps, so why bother.

Re: The reference D compiler is now open source

#56

Earlier quoted context omitted.

We investigated public domain, but that has international legal problems with it. Boost was the best solution.

Do you have any comment son international legal issues with public domain? Is that not recognized in some places?

Several European countries do not recognize the ability of copyright holders to completely give up their copyright. So it needs a license of some kind.

Re: The reference D compiler is now open source

#57

Whats special about D? why should i learn it?

Except for perhaps Lisp languages, almost no language makes compile-time computing and code-generation so easy. This allows for some really powerful language features that can be designed as libraries, and puts this power in the hands of "regular developers" rather than only in the hands of template wizards.

Anybody out there that has experience with both Nim and D? I am curious how they both compare in terms of metaprogramming.

Re: The reference D compiler is now open source

#58
post #45

Earlier quoted context omitted.

For someone who knows zero about D, but is a total Pythonista, how would you compare the meta-programming facilities?

I guess the best comparison to Python would be the dunder methods. You know how in Python a class really is just a dict, right? Like, foo.bar is pretty much syntactic sugar for foo.__get_attribute__(foo.__dict__['bar']) in most cases. Or how a + b is sugar for a.__plus__(b). Well, imagine that all of the things you can do in Python by messing with dunder methods, function decorators, or metaclasses could be precomput…

Yes, and plus you get type safety with all of that! When I'm writing in D, my editor marks all the type errors (and typos) in my code, almost as fast as I make them. The DMD compiler is so quick that there's almost no lag. This leads not only to a rapid development cycle, but a much higher level of reassurance (than I've had when writing, e.g., metaclass hacks in Python).

Re: The reference D compiler is now open source

#59
Please don't get me wrong, as I don't want to start a flame here, but why do they call D a "systems programming language" when it uses a GC? Or is it optional? I'm just reading through the docs. They do have a command line option to disable the GC but anyway...this GC thing is, imho, a no-go when it comes to systems programming. It reminds me of Go that started as a "systems programming language" too but later switched to a more realistic "networking stack".

Regards,

Re: The reference D compiler is now open source

#60
post #59

Please don't get me wrong, as I don't want to start a flame here, but why do they call D a "systems programming language" when it uses a GC? Or is it optional? I'm just reading through the docs. They do have a command line option to disable the GC but anyway...this GC thing is, imho, a no-go when it comes to systems programming. It reminds me of Go that started as a "systems programming language" too but later switch…

Why does gc disqualify a language as a system's language?

P.S. I think of a system's language as one that runs directly on the machine, e.g. Swift, C, go. They operate at the "system" level.

Post reply on HN