Non-ugly ways to implement a 'static' class or namespace?

bachmeier no at
Wed Feb 15 20:01:12 UTC 2023

On Wednesday, 15 February 2023 at 19:44:50 UTC, ProtectAndHide 

> A user-defined type is a type that has a mechanism to keep it 
> representation private.
> D does not support this. It only enables it.
> You (and others) may well argue that D should not enable this 
> (directly), it should only support it (indirectly), and thus 
> allow the language to force an important design decision onto 
> programmers.
> As a programmer, I don't think that is acceptable.

The response was to your claim that "I think what you could say 
is that D lacks _encapsulation_ which is also an OOP concept. So 
D is partially OOP but not fully OOP due to there being no 
encapsulation in the language."

Mike demonstrated clearly that your claim is false.

More information about the Digitalmars-d-learn mailing list