> > In GHC, when we allowed finalizers to be attached to any object
> > rather than being restricted to ForeignPtr (then ForeignObj), we
> > thought we might be able to do away with ForeignPtr altogether, and
> > just attach finalizers to Ptr (then Addr).
> 
> This may be one of the best arguments advanced so far for Haskell
> finalizers.  (It doesn't make it any easier to implement them but it
> at least gives us some motivation to want to do so.)

I may be a bit slow today (it's Friday afternoon after all) but I don't
follow you... could you elaborate?

BTW we haven't found any good uses for finalizers on arbitrary objects
apart from memo tables so far.  We have good uses for finalizers on
MVars and IORefs, though: these objects have a primitive core, just like
ForeignObj, and can't be arbitrarily duplicated by the compiler.

Cheers,
        Simon
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to