Using closure in function scope to make "real" private class members
forkit
forkit at gmail.com
Sun Jun 5 00:35:39 UTC 2022
On Sunday, 5 June 2022 at 00:30:14 UTC, forkit wrote:
>
> Again (how many time do I have to say this??), my argument is
> not favouring one or the other. It's favouring the 'option' to
> have both.
Well, to be clear, both exist already (i.e. one class per module,
and it's done).
But my argument is to have both in the context of a module that
contains a class, as well as other code (as I've made very clear
from the beginning).
I don't want to have to manually audit a whole module, just
becasue it contains code other than a class, and therefore, there
is no way to ensure the invariants of that class are being
upheld, without manually inspecting all code in that module. This
is my point. I should not have to do this manually, and I do not
want to 'forced' by the language to put each class in its own
module, because of this.
That's the end of my discussion on this topic ;-)
More information about the Digitalmars-d
mailing list