caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kenneth Knowles <kknowles@uclink.berkeley.edu>
To: Michael Vanier <mvanier@cs.caltech.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] extensible records?
Date: Thu, 26 Feb 2004 17:04:43 -0800	[thread overview]
Message-ID: <20040227010443.GA6359@tallman.kefka.frap.net> (raw)
In-Reply-To: <20040227004557.C85CE9BBA2@orchestra.cs.caltech.edu>

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


  reply	other threads:[~2004-02-27  1:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27  0:45 Michael Vanier
2004-02-27  1:04 ` Kenneth Knowles [this message]
2004-02-27  8:39 ` Aleksey Nogin
2004-02-27  8:39 ` Nicolas Cannasse
2004-02-27 11:17 ` Alexander S. Usov

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=20040227010443.GA6359@tallman.kefka.frap.net \
    --to=kknowles@uclink.berkeley.edu \
    --cc=caml-list@inria.fr \
    --cc=mvanier@cs.caltech.edu \
    /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).