Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] extensible records?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-02-27 (01:04)
From: Kenneth Knowles <kknowles@u...>
Subject: Re: [Caml-list] extensible records?
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

class type opaque_type =
	... various methods required of all data items ...

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.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: