Live data from Hacker News

D 2.069.0 released, compiler automatically ported from C++ to D

dlang.org

1–10 of 131 posts

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#4

Daniel Murphy is the man behind getting the sources converted from C++ to D. He wrote a program called "magicport" to do the bulk of it, with some manual tweaking. The back end is still in C++, showing that you can mix D and C++ code :-)

How is the compiler bootstrapped now (i.e. compiled from source without a working D compiler)? Via the gcc D implementation?

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#6
post #3

I'm wondering, is there an advantage of using D over Rust?

Some things D has that Rust doesn't: compiler-checked function purity annotations, higher-kinded types, variadic functions/generics, types parameterised by numbers, compile-time function evaluation, mixins, a fast compiler (the reference DMD compiler), powerful and convenient compile-time reflection (I think technically Rust can do anything D can at compile time, but it requires writing a syntax extension to do so). For better or worse, D also has classical OO inheritance, which Rust lacks.

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#7
post #3

I'm wondering, is there an advantage of using D over Rust?

Some things D has that Rust doesn't: compiler-checked function purity annotations, higher-kinded types, variadic functions/generics, types parameterised by numbers, compile-time function evaluation, mixins, a fast compiler (the reference DMD compiler), powerful and convenient compile-time reflection (I think technically Rust can do anything D can at compile time, but it requires writing a syntax extension to do so).…

I would say this is fairly accurate, yeah. We got rid of purity in Rust, we didn't find it useful. HKT, variadic generics, and type-level integers are all things we want to do in the future.

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#8
post #5
post #3

I'm wondering, is there an advantage of using D over Rust?

I guess D feels more like a better C++ and Rust like a better C, but I may be under the wrong impression.

Rust is more like the child of C and a functional language (OCaml).

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#9
post #5
post #3

I'm wondering, is there an advantage of using D over Rust?

I guess D feels more like a better C++ and Rust like a better C, but I may be under the wrong impression.

How would you consider Rust's generics as being part of a better C rather than a better C++?

Re: D 2.069.0 released, compiler automatically ported from C++ to D

#10

Daniel Murphy is the man behind getting the sources converted from C++ to D. He wrote a program called "magicport" to do the bulk of it, with some manual tweaking. The back end is still in C++, showing that you can mix D and C++ code :-)

How is the compiler bootstrapped now (i.e. compiled from source without a working D compiler)? Via the gcc D implementation?

If my information is still actual, the last C++ based implementations will be used for the time being for such purposes.
Post reply on HN