Non-ugly ways to implement a 'static' class or namespace?
acehreli at yahoo.com
Tue Feb 7 16:07:55 UTC 2023
On 2/6/23 23:45, ProtectAndHide wrote:
> Well I don't agree that D should boast about things that's its
> implemented in an unprincipled way.
Here, "unprincipled" is just a descriptive word meaning that D does
not insist on certain software engineering methodologies e.g. unlike
Java where "everything is a class" or unlike some functional programming
languages where "everything must be immutable".
> an unprincipled
> implementation of something that just allows you do make mistakes, then
> it should be looked at further, so see if it can be improved.
Agreed. But the lack of 'static class' in D or its approximations are
not in that category. I can imagine someone coming up ingeniously with a
harmful way of using 'static class' but unless that is a real problem
that affects D users then there is no issue.
 I remember reading or hearing "unprincipled" from Andrei
Alexandrescu long time ago.
 Actually, const and immutable being transitive can be seen as
counter examples of D having a strong point on something. I think this
"turtles all the way down" is not agreed by many users.
More information about the Digitalmars-d-learn