Why is D unpopular

bauss jj_1337 at live.dk
Mon Jun 13 12:29:01 UTC 2022


On Monday, 13 June 2022 at 12:03:10 UTC, Max Samukha wrote:
> On Monday, 13 June 2022 at 10:55:36 UTC, Ola Fosheim Grøstad 
> wrote:
>> On Monday, 13 June 2022 at 10:51:10 UTC, Mike Parker wrote:
>>> 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.
>>
>> It breaks the sub-typing requirement.
>>
>> If you get more access by recasting a pointer to the 
>> super-type then the sub-typing relation cannot be satisfied.
>
> And the reason is the private member of the class shouldn't be 
> accessible outside its declaration scope in the first place. 
> Module-level 'private' is dysfunctional by design.
>
>>
>> Hence, it is certainly broken. If it is not a bug, then it is 
>> broken by design. Which is no better.

I honestly don't have a problem with module-level private, but I 
do have a problem with inconsistency and ignorance.

D argues so much about being module-level private, but it really 
isn't.


More information about the Digitalmars-d mailing list