caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Ryan Tarpine" <rtarpine@hotmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] Allowing many types
Date: Thu, 07 Feb 2002 21:29:44 -0500	[thread overview]
Message-ID: <F51Y3IMPWEAM9oQgGfJ00009180@hotmail.com> (raw)

  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


             reply	other threads:[~2002-02-08  2:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-08  2:29 Ryan Tarpine [this message]
2002-02-08 16:37 ` Ceri Storey
2002-02-08 16:53   ` Remi VANICAT
2002-02-10 17:42     ` Ceri Storey
2002-02-11  1:43 Ryan Tarpine
2002-02-11 10:53 ` Ceri Storey
2002-02-11 11:48   ` Remi VANICAT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F51Y3IMPWEAM9oQgGfJ00009180@hotmail.com \
    --to=rtarpine@hotmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).