Why is D unpopular
bauss
jj_1337 at live.dk
Mon Jun 13 08:50:17 UTC 2022
On Monday, 13 June 2022 at 08:49:18 UTC, bauss wrote:
> On Monday, 13 June 2022 at 08:44:59 UTC, bauss wrote:
>> On Monday, 13 June 2022 at 08:07:05 UTC, Mike Parker wrote:
>>>
>>> But why should that compile? You're trying to manipulate `_c`
>>> through an instance of `Bar`. It's not visible in any `Bar`,
>>> ever, so why should it be visible here? It has to be gotten
>>> at through the interface of `Foo`.
>>
>> Because I'm in the module of a, _c is a member if Foo, Foo is
>> in a.
>>
>> Thus _c should be accessible within a regardless of whether
>> it's public within the b module or not.
>
> My argument for why it should work is that if you place the
> subclass within the same module then it works, so clearly it's
> just a matter of where the function was called, not where it
> resides.
Actually I could have worded this better, but hopefully my point
comes across.
More information about the Digitalmars-d
mailing list