Why is D unpopular

Mike Parker aldacron at gmail.com
Mon Jun 13 10:51:10 UTC 2022


On Monday, 13 June 2022 at 10:44:43 UTC, bauss wrote:
> On Monday, 13 June 2022 at 10:43:09 UTC, bauss wrote:
>> On Monday, 13 June 2022 at 10:13:30 UTC, Mike Parker wrote:
>>>
>>
>> Look, I'm not against the logic, I completely understand it 
>> from the perspective of that a subclass shouldn't have access 
>> to private members of the class it inherits from, BUT remember 
>> in D private doesn't mean private to the class, so the symbol 
>> should only be private when accessed from anywhere but the 
>> module.
>
> To add on to this; it's not a matter of what's more logical, 
> but simply that D is contradicting itself, so either D stops 
> being referred to as "module private" or this will be deemed an 
> unfinished feature/bug.

And I'm arguing that this is exactly what we should expect from 
private-to-the-module, since B is not declared in the same module 
as the superclass, so it's neither unfinished nor a bug.




More information about the Digitalmars-d mailing list