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

thebluepandabear thereabluepandabear at protonmail.com
Wed Feb 15 01:16:00 UTC 2023


On Wednesday, 15 February 2023 at 01:15:09 UTC, thebluepandabear 
wrote:
> On Tuesday, 14 February 2023 at 15:34:17 UTC, bachmeier wrote:
>> On Tuesday, 14 February 2023 at 10:16:47 UTC, ProtectAndHide 
>> wrote:
>>
>>> In any case, there is nothing 'picky' about wanting to be 
>>> able to explicately 'declare' a member of my class type as 
>>> being private. That to me, is what a programmer should expect 
>>> to be able to do in a language that says it supports OOP.
>>
>> What you are saying is that you want an implementation of a 
>> particular language that calls itself an OOP language. [There 
>> is a lot of controversy about the definition of 
>> OOP](https://wiki.c2.com/?NobodyAgreesOnWhatOoIs). I do not 
>> think the explicit ability to declare a member of a class 
>> private in a particular way has anything to do with it. You 
>> are certainly entitled to your opinion, but it doesn't help to 
>> say D is not an OOP language because you don't like some of 
>> the design decisions.
>
> D is still an OOP language, as long as it has classes, 
> inheritance, and polymorphism, though it's certainly not a good 
> one if any class can acccess private members from the module, 
> that's just horrid.

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.


More information about the Digitalmars-d-learn mailing list