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 CAA02005; Fri, 27 Feb 2004 02:04:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id CAA02192 for ; Fri, 27 Feb 2004 02:04:45 +0100 (MET) Received: from localhost (adsl-64-162-212-212.dsl.snfc21.pacbell.net [64.162.212.212]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i1R14mIq008371 for ; Fri, 27 Feb 2004 02:04:49 +0100 Received: by localhost (Postfix, from userid 1000) id 704D06A4B39; Thu, 26 Feb 2004 17:04:43 -0800 (PST) Date: Thu, 26 Feb 2004 17:04:43 -0800 From: Kenneth Knowles To: Michael Vanier Cc: caml-list@inria.fr Subject: Re: [Caml-list] extensible records? Message-ID: <20040227010443.GA6359@tallman.kefka.frap.net> References: <20040227004557.C85CE9BBA2@orchestra.cs.caltech.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040227004557.C85CE9BBA2@orchestra.cs.caltech.edu> User-Agent: Mutt/1.5.5.1i X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; knowles:99 caml-list:01 extensible:01 opaque:01 opaque:01 int:01 int:01 float:02 float:02 thread:02 classes:03 object:03 data:03 limitations:05 weird:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi Mike, What I did, which may or not be powerful enough for you, was to use classes. I'm actually hoping that this thread comes up with something better for me to use: class type opaque_type = object(s) ... various methods required of all data items ... end type datavalue = | Int of int | Float of float | Opaque of opaque_type So it is fairly easy to add a new type, or some kind of weird opaque reference. I haven't really used it much, so I don't know of its limitations. Kenn ------------------- 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