D 2015/2016 Vision?
bitwise via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 8 09:17:48 PDT 2015
On Thursday, 8 October 2015 at 14:05:07 UTC, Jonathan M Davis
wrote:
>
> Maybe, but having classes be value generally makes no sense,
> because you can't use polymorphism with value types.
This is a huge generalization, and is incorrect. You can still
use inheritance.
> Classes are inherently reference types given their semantics.
Incorrect.
> Even in C++ that's the case. It's just that they don't separate
> out classes and structs the way we do. But classes that use
> inheritance have to be used as reference types or all you're
> doing is sharing implementation (which can be done easily
> enough without inheritance).
It _can_ be done, but that doesn't mean that it's _always_ the
best, or even preferred approach.
Bit
More information about the Digitalmars-d
mailing list