Earlier quoted context omitted.
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.
D 2.069.0 released, compiler automatically ported from C++ to D
11–20 of 131 posts
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#12Earlier quoted context omitted.
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.
The ship's probably sailed on this, but is there any chance of Rust getting a module system like OCaml's (or Haskell's upcoming Backpack) in future? Or is there a way to provide module signatures with the current module system?
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#13I'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.
In any case, congratulations.
I wonder if the C++ to D translator could be used in other codebases, like Fltk for example.
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#14Earlier quoted context omitted.
The ship's probably sailed on this, but is there any chance of Rust getting a module system like OCaml's (or Haskell's upcoming Backpack) in future? Or is there a way to provide module signatures with the current module system?
Never say never, but I'm not aware of anyone who's even working on thinking about suggesting it. That'd be step one, creating an RFC which thinks through the design.
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#15Earlier quoted context omitted.
Never say never, but I'm not aware of anyone who's even working on thinking about suggesting it. That'd be step one, creating an RFC which thinks through the design.
There's this: https://internals.rust-lang.org/t/traits-ml-modules/272 , but it didn't seem to get anywhere.
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#16Re: D 2.069.0 released, compiler automatically ported from C++ to D
#17Earlier quoted context omitted.
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++?
This is a quite important part of Rust (IMHO) because it gives the language a performance profile closer to C than C++ in many instances.
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#18Earlier quoted context omitted.
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++?
Rust is marketed as a "general-purpose, multi-paradigm, compiled programming language" and D "originated as a re-engineering of C++", so may be I'm biased by my interpretation of the goals from both language designers.
Re: D 2.069.0 released, compiler automatically ported from C++ to D
#19Earlier quoted context omitted.
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++?
In Rust you still can do "clever" things with generics to make them feel like C++, but the rest of the language is still closer to C: errors returned rather than thrown, no inheritance (but the "flat" OO and enums map well to what OO-like C programs do with "handles"), no constructors, etc.