Why is D unpopular

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Jun 12 11:49:21 UTC 2022


On Sunday, 12 June 2022 at 10:40:02 UTC, Max Samukha wrote:
> Then it is natural to expect the feature would apply to the 
> class level (if we are talking about class-based OOP)? Really, 
> I'm yet to meet a D user that wouldn't be surprised 'private' 
> is module-level. And the 'friend' story rarely impresses them. 
> The reply is always: "Ok, 'friend' breaks OOP principles. Is D 
> better because it breaks OOP in its own way?"

Yes, of course, D could make private work like C++ and give 
module access to protected instead.

You could also allow reading of object attributes from the module 
and restrict writing to the object (without using properties).



More information about the Digitalmars-d mailing list