Browse thread
Safe Obj.magic container ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Teller <David.Teller@u...> |
| Subject: | Re: [Caml-list] Safe Obj.magic container ? |
Interesting. Can I assume that, if my type is boxed (in this case, a polymorphic variant), I can successfully convert it to Obj.t and back ? Thanks, David On Thu, 2008-02-28 at 15:23 +0100, Damien Doligez wrote: > If that was the whole story, Obj.magic would be pretty safe. But > there are exceptions to the uniform representation of values, and > they make Obj.magic really hard to use. > > The most important exception is floating-point numbers. They are > not always represented as one word each, and that means even > Obj.repr is unsafe. -- David Teller Security of Distributed Systems http://www.univ-orleans.fr/lifo/Members/David.Teller Angry researcher: French Universities need reforms, but the LRU act brings liquidations.