Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-01-29 (17:26)
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.



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 Archives:
Bug reports: FAQ:
Beginner's list: