[Haskell-cafe] Designing DSL with explicit sharing [was: I love
purity, but it's killing me]
Jan-Willem Maessen
jmaessen at alum.mit.edu
Fri Feb 15 14:12:39 EST 2008
On Feb 15, 2008, at 1:15 PM, Tony Finch wrote:
> On Thu, 14 Feb 2008, oleg at okmij.org wrote:
>>
>> As I understand the original problem had less to do with the number
>> of
>> comparison but more to do with the cost of a single comparison. In an
>> impure language, we can use constant-time physical equality. It is
>> usually provided natively as pointer comparison, and can be trivially
>> emulated via mutation.
>
> In Haskell you can (with care) use System.Mem.StableName.
> http://research.microsoft.com/~simonpj/Papers/weak.htm
Extra points to anyone who can demonstrate this actually in use for
caching.
-Jan-Willem Maessen
More information about the Haskell-Cafe
mailing list