I don't like the separation between Structs and Classes in D. I think that having to avoid classes if you don't want to use the GC could force people to have implemented the same artifact as a Class and as a Struct. Also don't get why a value type / stack object is simply not allowed to use runtime polymorfism. It feels more natural when you can do such distinction when defining a variable type, as you can do in Rust. Could you defend the D approach over the C++ aproach or the Rust approach?
Thanks in advance Andrei, I'm following your work since I've discovered your book Modern C++ Design!
Elelegido8 karma
I don't like the separation between Structs and Classes in D. I think that having to avoid classes if you don't want to use the GC could force people to have implemented the same artifact as a Class and as a Struct. Also don't get why a value type / stack object is simply not allowed to use runtime polymorfism. It feels more natural when you can do such distinction when defining a variable type, as you can do in Rust. Could you defend the D approach over the C++ aproach or the Rust approach?
Thanks in advance Andrei, I'm following your work since I've discovered your book Modern C++ Design!
View HistoryShare Link