Possible way to achieve lazy loading with const objects

Steven Schveighoffer schveiguy at yahoo.com
Mon Sep 26 12:05:02 PDT 2011


On Mon, 26 Sep 2011 15:02:24 -0400, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:


> I think a better avenue would be to implement some sort of strong-pure  
> memoization system.  Then all you have to do is make an immutable pure  
> member, and the compiler will take care of the rest for you.
>
> I think this only works for classes, however, since there is no place to  
> put hidden memoization members...

...in structs.

-Steve


More information about the Digitalmars-d mailing list