From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA17857; Thu, 29 Jan 2004 18:26:49 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA18515 for ; Thu, 29 Jan 2004 18:26:48 +0100 (MET) Received: from smtp.web.de (smtp02.web.de [217.72.192.151]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i0THQhP22290 for ; Thu, 29 Jan 2004 18:26:43 +0100 (MET) Received: from [213.23.227.210] (helo=discworld) by smtp.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.99 #566) id 1AmFw0-00063b-00; Thu, 29 Jan 2004 18:26:33 +0100 From: Benedikt Grundmann To: james woodyatt , William Lovas Subject: Re: fancy types (was Re: [Caml-list] ocaml killer) Date: Thu, 29 Jan 2004 18:26:30 +0100 User-Agent: KMail/1.5.4 Cc: The Trade References: <20040127063230.GA12482@inv_machine> <20040129162048.GA29094@force.stwing.upenn.edu> <6C1153CA-527E-11D8-9FE3-000393B8133A@wetware.com> In-Reply-To: <6C1153CA-527E-11D8-9FE3-000393B8133A@wetware.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200401291826.30847.Benedikt-Grundmann@web.de> X-Loop: caml-list@inria.fr X-Spam: no; 0.00; benedikt:01 grundmann:01 caml-list:01 lablgtk:01 initialized:01 2004:99 woodyatt:01 lovas:01 deque:01 unifying:01 ocaml:01 exists:01 discouraged:03 discouraged:03 typing:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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