Adding a new design constraint to D
Kagamin
spam at here.lot
Thu Jun 16 11:10:33 UTC 2022
On Thursday, 16 June 2022 at 08:58:09 UTC, forkit wrote:
> On Thursday, 16 June 2022 at 07:45:52 UTC, Kagamin wrote:
>>
>> ..
>> Also memoization is a use case for varying access between
>> different methods of the same class. Would you address that
>> too?
>
> I got no idea what that is all about.
>
> I just want to make a private variable in my class, private to
> the class ;-)
When you have a lazily initialized field, you need to use an
accessor, because if you read the raw field, you get an
uninitialized value and error as a result, so only the accessor
should have access to the field.
More information about the Digitalmars-d
mailing list