`restricted` member variables
Mike Parker
aldacron at gmail.com
Mon Jun 20 11:28:45 UTC 2022
On Monday, 20 June 2022 at 11:16:40 UTC, deadalnix wrote:
> The simple way out of this is that, if it touches thee class's
> privates parts, it ought to run the invariant checks.
That was my first thought. But then there's the case of the
function contracts. That's what led me to this.
If my only invariant is the state of a single member variable,
then I really only want it checked on the function(s) that
actually write to it.
More information about the Digitalmars-d
mailing list