Earlier quoted context omitted.
There's a wide range of possibilities int that statement that include the case where you would almost always want D over Rust, and the case where you would almost never want D over Rust. The question is, how much easier is D than Rust, and how much safer is D than C++.
There is no quantitative metric for safety and easyness. If you can afford a garbage collector, D easily wins over Rust. If you really need the safe manual memory management, Rust wins. In between is still a large grey area.
The reference D compiler is now open source
61–70 of 313 posts
Re: The reference D compiler is now open source
#62Please 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.
Re: The reference D compiler is now open source
#63Honestly, since I'm slightly psychotic about these things, this is a kind of huge to me. Part of the reason I never learned D was because the compiler was partly proprietary. Now I have no excuse to avoid learning the language, and that should be fun.
I refused to touch Swift until Apple open-sourced it for the same reason :-)
Re: The reference D compiler is now open source
#64Earlier quoted context omitted.
There are plenty of reasons why Rust could win outside of requiring safe manual memory management. It is an expression based language with ad-hoc polymorphism, algebraic data types, hygienic macros, first class functions, and race-free concurrency. I don't use rust because I don't need manual memory management and I require subtype polymorphism for a lot of things, but I choose Scala over D.
Neither Rust nor Scala hold a candle to D in terms of compile-time introspection. You can do things with it that are near unbelievable - "you must ask yourself if some law of nature was broken" quoted from memory in http://dconf.org/2015/talks/alexandrescu.html
Re: The reference D compiler is now open source
#65This was something that always rubbed me the wrong way about the language, and it was an impediment for adoption for me (for D, but also Shen and a few others). In this era, there is no excuse for a closed source reference compiler (I could care less if it's not a reference compiler, I just won't use it). I'm surprised it took this long to do this, it seems like D has lost most of its relevance by now...relevance it…
D is easier than Rust and safer than C++. That is a valuable point IMHO.
Re: The reference D compiler is now open source
#66Re: The reference D compiler is now open source
#67Anybody worked on performance critical stuff in D? How good is its GC?
dmd and Digital Mars C++
gdc and gcc
ldc and clangRe: The reference D compiler is now open source
#68Earlier quoted context omitted.
There's plenty you can do with D but not C++, see regex, bitfields, swap member-by-member with checks for mutual pointers, the pegged library for grammars, etc etc.
I don't know, Boost has me convinced that even things like regexes in C++ templates could be possible, if your compiler has a big enough stack to handle very deep template recursions. It's theoretically possible to build a regex parser in C++ templates, right? It would be horrible, but possible.
Re: The reference D compiler is now open source
#69Re: The reference D compiler is now open source
#70Earlier quoted context omitted.
There is no quantitative metric for safety and easyness. If you can afford a garbage collector, D easily wins over Rust. If you really need the safe manual memory management, Rust wins. In between is still a large grey area.
Is the GC mandatory in D? I was under the impression some time ago that D could run GC-free, but the standard library still widely used GC. Did I just misunderstand?