If you could make any changes to D, what would they look like?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Thu Oct 21 19:59:03 UTC 2021
On Wednesday, 20 October 2021 at 21:05:44 UTC, Ali Çehreli wrote:
> Me neither because I was following convention in C++: "Pass
> inherited types by reference because there is slicing." That
> rule renders C++ classes (and structs) of inheritance
> hierarchies "reference types". I like D's (and Java's and C#'s)
> approach here.
That is the classical Simula model. Simula did however use ":-"
for reference assigment and ":=" for value assignment, so it was
always clear to the user that objects followed reference
semantics.
More information about the Digitalmars-d
mailing list