Mon, 12 Jun 2000 20:42:16 +1000 (EST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> pisze:

> To do this would require several things the current Dynamic library lacks:
[...]

I think it's much harder. How would you store and restore actual data?

It depends on its real type, and for many types it's impossible or
impractical ((->), IO, ForeignObj, Handle, MVar, ThreadId), even if
in some sense every part of the value is already evaluated.

OCaml's values look a bit simpler. There exist functions for dumping
and restoring almost any values, even with cycles, and optionally
with functions, provided that it is restored in a process running the
same binary program - code addresses are stored. No type information
existed before dumping (integer 0 looks exactly as false and [] and
NONE) and thus none is restored. You get fancy coercions or undefined
behavior when restoring to a wrong type.

Do you mean storing the physical structure of values without knowing
their types, similarly as in OCaml? Or overloaded specialized dumpers
and restorers for particular types?

-- 
 __("<    Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
 \__/              GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
  ^^                  W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK                  5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-


Reply via email to