Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocaml killer
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Benedikt Grundmann <Benedikt-Grundmann@w...>
Subject: Re: fancy types (was Re: [Caml-list] ocaml killer)
I'm using it sometimes in connection with lablgtk and camls object system.
In particular the restriction that object fields cannot be initialized with an
expression that uses the value of another field requires me to use Obj.magic.

Cheers,

Bene


On Thursday 29 January 2004 18:13, james woodyatt wrote:
> On 29 Jan 2004, at 08:20, William Lovas wrote:
> > [...] (which already exists in the standard library, it being
> > mysteriously named Obj.magic and its use being highly discouraged).
> > In all
> > of my scenarios, regular old parametric polymorphism was able to
> > handle the
> > typing.  In what sort of situation have you needed this identity
> > function?
>
> I needed to use it in two places in the Cf library I recently released.
>
> 	1) In Cf_deque, for bootstrapping the data structure.
> 	2) In Cf_gadget, for unifying continuations in the scheduler.
>
> Its use is highly discouraged for good reason.  You don't want to know
> what it was like trying to get the bugs out of code that used this
> function improperly.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners