Why is D unpopular

Mike Parker aldacron at gmail.com
Mon Jun 13 08:07:05 UTC 2022


On Monday, 13 June 2022 at 07:59:24 UTC, bauss wrote:

>
> If D is truly "module private" then the above should be able to 
> compile, if it's "class private" then it shouldn't be able to 
> compile.
>
> Since the above doesn't compile then D isn't really "module 
> private" and thus the conclusion is that one of the most 
> fundamental features of D is also an unfinished feature.

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`.



More information about the Digitalmars-d mailing list