Struct inheritance
Derek Fawcus
dfawcus+dlang at employees.org
Tue Dec 3 19:30:37 UTC 2024
On Tuesday, 3 December 2024 at 19:15:39 UTC, Derek Fawcus wrote:
> Personally, I'd rather have a struct like (POD) thing, even
> with member functions, which does not allow for the possibility
> of classful behaviour. If classful behaviour is desired, then
> somehow adjust classes so that they can be easily used as
> non-reference types.
Also as I mentioned elsewhere, I don't like the idea of adding
such to the betterC subset.
If one wants classful behaviour in betterC, then I'd suggest
somehow making classes work in betterC, and leaving structs
without and possibility of classful stuff. That keeps more
closely to the spirit of C, and without any of the Simula-67 like
C-with-Classes stuff.
Even then, I'd rather not have any form of classful behaviour
(i.e. struct inheritance) in betterC, but that is obviously just
my personal preference.
More information about the dip.ideas
mailing list