Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] enums in OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: leary@n...
Subject: Re: [Caml-list] enums in OCaml?
Yup, that's the functionality I was looking for.  I wonder, tho' ('cause
I'm like that...), since plain ol' named variables would be shorter, what
is the argument for using sum types w/ pattern matching instead?

On Wed, Jun 13, 2001 at 10:46:36AM +0200, David Mentre wrote:
> Maybe you should have a look at source code of standard libraries. They
> are remarkably concise and well written.

Thanks for the link, I'd passed that over (!) as a reference for examples.
Which brings up a question: Is there anyone working on annotating the
standard/core libraries.  Might do for OCaml a bit of the magic that the
classic work did for Unix and C (I forget the title/author; someone?).

> For example, operations on lists (List module):
> http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/ocaml/stdlib/list.ml?rev=1.27&content-type=text/x-cvsweb-markup
-------------------
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