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

ProtectAndHide ProtectAndHide at
Wed Feb 15 20:05:22 UTC 2023

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

"The basic support for programming with data abstraction consists 
of facilities for defining a set of operations (functions and 
operators) for a type and for restricting the access to objects 
of the type to that set of operations."

D does not enable this. It only supports it, because the 
programmer has to revert to 'data hiding techniques' at the 
module level, instead of at the type level.

D should enable programmers to express and utilise 'proper' 
types, just as C++, C#, Swift can... hell, even Javascript 
enables programmers to do this.

What is 'Object-Oriented Programming'? (1991 revised version) 
Bjarne Stroustrup

More information about the Digitalmars-d-learn mailing list