`restricted` member variables
Mike Parker
aldacron at gmail.com
Tue Jun 21 01:20:27 UTC 2022
On Tuesday, 21 June 2022 at 01:17:14 UTC, Mike Parker wrote:
> On Tuesday, 21 June 2022 at 01:01:09 UTC, deadalnix wrote:
>
>> I'm pretty sure x can be encapsulated in some struct here.
>
> Yes, I did note that later in the post you just replied to :-)
> Put it in a struct and then a different module. So `restricted`
> is absolutely pointless because of that. It's the obvious
> solution that I overlooked until I read your comment about two
> classes bundled in one.
That said, spilling class internals out into a separate module is
a bit "icky". Targeted invariants would be nice. Not a must have,
probably a niche case, but definitely nice to have.
More information about the Digitalmars-d
mailing list