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

ProtectAndHide ProtectAndHide at
Sat Feb 18 06:55:49 UTC 2023

On Saturday, 18 February 2023 at 06:12:47 UTC, RTM wrote:
> No offense, but it looks like your surprise comes from your 
> inexperience.

More likely is comes from my experience .. otherwise I wouldn't 
be surprised ;-)


I love the way that Brayan Martinez (Senior Developer with Azure, 
Spring Boot, and Flutter.) outlines all the well-thoughout out 
positive reasons.

Then the next guy says..."Sounds like personal preference."

As for me, I don't even know what Dart is ;-)

I guess we could all revert to:

class foo()
   int _x; // this is private. please don't use it outside of this 

and hope that people read and comply with that instruction - 
cause we all know how great people are at following instructions 

D could just add a new keyword (problem solved!)

class foo()
   intern int x; // x is internal to foo.

of course, then we get to the next issue ... protected ;-)

No, I think D is not for me.

More information about the Digitalmars-d-learn mailing list