Adding a new design constraint to D
Mike Parker
aldacron at gmail.com
Tue Jun 14 12:33:53 UTC 2022
On Tuesday, 14 June 2022 at 12:28:24 UTC, Ola Fosheim Grøstad
wrote:
> On Tuesday, 14 June 2022 at 12:19:40 UTC, Mike Parker wrote:\
>> And Paul did show you how to do that with `child.Foo._c`.
>
> Which is a pointless thing to say, you are still violating the
> subtyping relationship.
So then what do you do when your direct access to `child._c`
suddenly starts causing a subtle bug because someone added later
added a `_c` member to the public interface of `Bar`? Private
members are not inherited and do not impact the public interface.
More information about the Digitalmars-d
mailing list