Very hacky solution to class private members

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Jun 9 13:36:52 UTC 2022


On Thursday, 9 June 2022 at 12:42:22 UTC, forkit wrote:
> But it should be your design decision, not the language forcing 
> it onto you.

In an ideal world, yes. In the practice you have to think about 
the limitations of the language when you do modelling.

All the C dialects come with their own set of limitations… If you 
compare D to other C-dialects the orignal D quality was to be 
more *simple* than languages such as C++ and Objective-C++.

As such, the module-level thinking is a simplification. Other 
aspects of the language has broken with the "make it simple" 
vision, which is unfortunate, but difficult to undo.

To a large extent this feature-creep is due to giving in to 
demands and whims and not resisting ideas that are "not simpler".

I guess you could argue that resisting class-privacy is the wrong 
feature to resist, but objectively speaking: D should absolutely 
resist more feature bloat and only give in where it truly matters.




More information about the Digitalmars-d mailing list