Using closure in function scope to make "real" private class members
forkit
forkit at gmail.com
Fri Jun 3 05:34:48 UTC 2022
On Wednesday, 1 June 2022 at 12:24:23 UTC, Dukc wrote:
>
> Frankly, I don't think this thing is worth doing any hacks for.
> Controlling the scope of encapsulation is rarely that critical,
> and if it is, it's easier to just put the class to it's own
> file.
That only option available to me in D, to ensure that my class
has truly 'private' members (so that no other code within the
same module can access them), is to put it in it's own module.
That's so sad.
More information about the Digitalmars-d
mailing list