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

Reply via email to