Vtable for virtual functions in D
sarn
sarn at theartofmachinery.com
Tue Apr 3 07:44:38 UTC 2018
On Tuesday, 3 April 2018 at 00:22:52 UTC, Mike Franklin wrote:
> I'm curious about this comment in the code:
>
>> Unfortunately, "protected" doesn't work, so a lot of members
>> end up being public. This seems to just be an oversight in
>> the language, so maybe it will change in future versions of D.
>
> What specifically do you think should be changed in the
> language to support your idea?
>
> Thanks,
> Mike
Sorry, I'll go into the details in my blog post, but what that
comment is talking about is this: D has a "protected" specifier
for classes, just like C++, but not one for structs - struct
members can only be private or public. This is because D structs
don't natively support inheritance.
More information about the Digitalmars-d
mailing list