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

H. S. Teoh hsteoh at
Thu Feb 16 13:39:13 UTC 2023

On Thu, Feb 16, 2023 at 08:51:39AM +0000, FeepingCreature via Digitalmars-d-learn wrote:
> Springboarding off this post:
> This thread is vastly dominated by some people who care very much
> about this issue. Comparatively, for instance, I care very little
> because I think D already does it right.
> But then the thread will look unbalanced. This is a fundamental design
> flaw in forum software.
> So let me just say: I think D does it right. D does not have class
> encapsulation; it has module encapsulation. This is by design, and the
> design is good.

+1, this issue is wayyy overblown by a vocal minority. D's design
diverges from other languages, but that in itself does not make it a bad
design.  In the context of D it actually makes sense. Saying that D's
design is bad because language X does it differently is logically
fallacious (X is good, Y is not X, therefore Y is bad).


He who sacrifices functionality for ease of use, loses both and deserves neither. -- Slashdotter

More information about the Digitalmars-d-learn mailing list