Possible way to achieve lazy loading with const objects

Walter Bright newshound2 at digitalmars.com
Sun Sep 25 17:46:00 PDT 2011


On 9/23/2011 9:11 PM, Jonathan M Davis wrote:
> Okay. I'm not saying that we should necessarily implement this. I'm just
> looking to air out an idea here and see if there are any technical reasons why
> it can't be done or is unreasonable.

Andrei and I talked about this some time back. Where it ran aground was Andrei 
wanted a way to mark the object as 'dirty' so it would get reloaded. We couldn't 
find a way that didn't look like a mess.

It also has problems if you try and add 'const' to it, because it is under the 
hood not const. Nor is it immutable or thread safe.


More information about the Digitalmars-d mailing list