Andrew Coppin wrote:
Jan-Willem Maessen wrote:
> Usually the clever thing you want to know is "this is the sole > reference to the pointed-to object".

Does GHC have weak references? (I seem to recall it does...)


http://www.haskell.org/ghc/docs/latest/html/libraries/base/System-Mem-Weak.html


As for the uniqueness of a reference to an object, there are alternatives to reference-counting techniques. For example, the language Clean[1] builds it into the type system (to replace monads) and they've gotten very good performance results from doing so. There are other linear logic approaches as well, though porting any of these to Haskell would take a fair deal of work to make efficient. Certainly a worthy research goal, but probably not what you had in mind :)

[1] <http://clean.cs.ru.nl/>

--
Live well,
~wren
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to