If you could make any changes to D, what would they look like?
Adam D Ruppe
destructionator at gmail.com
Wed Oct 20 17:42:32 UTC 2021
On Wednesday, 20 October 2021 at 17:28:30 UTC, Guillaume Piolat
wrote:
> One of the problem C++ has with
> objects-with-inheritance-as-value-type is "object slicing".
That's why:
void foo(Object o) {} // error: cannot declare variable of class
value type; the rule is still they're always references
It still requires you to always use it by reference, you just
have to write it out differently.
More information about the Digitalmars-d
mailing list