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 DAA18645; Fri, 8 Feb 2002 03:29:51 +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 DAA18840 for ; Fri, 8 Feb 2002 03:29:50 +0100 (MET) Received: from hotmail.com (f51.law8.hotmail.com [216.33.241.51]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g182Tn917911 for ; Fri, 8 Feb 2002 03:29:49 +0100 (MET) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 7 Feb 2002 18:29:45 -0800 Received: from 68.82.53.91 by lw8fd.law8.hotmail.msn.com with HTTP; Fri, 08 Feb 2002 02:29:44 GMT X-Originating-IP: [68.82.53.91] From: "Ryan Tarpine" To: caml-list@inria.fr Subject: [Caml-list] Allowing many types Date: Thu, 07 Feb 2002 21:29:44 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 08 Feb 2002 02:29:45.0181 (UTC) FILETIME=[78ACD0D0:01C1B048] Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Recently, I've been playing with writing my own language. With some good books, and inspiration from existing languages, it's not that hard, really, even for a beginner :) The only problem I've found is setting the possible data types, the so-called "primitives" of the language. Currently, I have something like this: type Primitive = | PInt of int | PString of string | PFloat of float ... The problem is, I know that I will need new types in the future besides these. It's an object-oriented language, and I would like to add classes that manage things like Tk. Every object has a variable of type Primitive that it stores its value in. Is it possible to somehow allow other types, like Tk's widgets, without changing the definition of Primitive to include them and recompiling everything? Thanks in advance, Ryan Tarpine, rtarpine@hotmail.com "To err is human, to compute divine. Trust your computer but not its programmer." - Morris Kingston _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr