Dan Sugalski wrote:
> 
> You're ignoring side-effects. The tied data may well be returned the same 
> every time it's accessed, but that doesn't mean that things aren't 
> happening behind the scenes. 

Like the :constant attribute on object methods in certain other languages.

So, we could say, if :constant not on the sub, don't cache.

As for :idempotent, I think sort() needs to assume the comparison sub
is idempotent, rather than requiring such an attribute explicitly.

-- 
John Porter

Give the braindead no head.

Reply via email to