Non-ugly ways to implement a 'static' class or namespace?
zjh
fqbqrr at 163.com
Wed Feb 15 09:51:41 UTC 2023
On Wednesday, 15 February 2023 at 08:57:27 UTC, Mike Parker wrote:
> I meant to say, it "wouldn't add more".
What if two classes in the module that are several meters apart
make `mistakes` that change the privite variable of `another
class`?
No one can guarantee that after `a few months`, even if you are
the author, you will not make mistakes, so as to misuse private
variable, while `class level` private can be completely avoided
it!
There is no maintainability, because two `out-of-class` functions
may quietly change your private `variables`.
More information about the Digitalmars-d-learn
mailing list