A monad can surely handle this, but then this is purely for caching, and enforcing a monad just for getting caching sounds like overkill. Caching is something you typically add in the end, and using a monad for that seems akward no? Since all "objects" in Haskell are readonly, it looks line an ideal opportunity to associate a cached object with another object without needing to wrap a lot of code in a monad On Wed, Sep 2, 2009 at 1:25 AM, Brandon S. Allbery KF8NH<allbery@ece.cmu.edu> wrote:
On Sep 1, 2009, at 14:57 , Peter Verswyvelen wrote:
In .NET it is possible to assign an identifier to an object, and that identifier will always be the same for the same object, no matter where to garbage collectors moves the object in memory. For Haskell, at first sight it would feel natural to have something like that too.
Hm. I'd think such names would have to live in a monad (which then leads you to either Reader or ST, I think).
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH