memoize
bearophile
bearophileHUGS at lycos.com
Tue Jan 4 09:53:43 PST 2011
Andrei:
> So generally when you write "attribute(expression)" the attribute will
> be in effect if and only if the expression is true.
It looks acceptable. Many solutions are better than the current need to duplicate code :-)
Regarding the purity of memoize, a kind of compiler-blessed built-in memoization for pure functuions allows pure memoization... (It is a trusted pure, where the trusted entity is the compiler)
Bye,
bearophile
More information about the Digitalmars-d
mailing list