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 WAA00867; Wed, 13 Jun 2001 22:50:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA00461 for ; Wed, 13 Jun 2001 22:50:05 +0200 (MET DST) Received: from ip208.usw4.rb1.pdx.nwlink.com (ip208.usw4.rb1.pdx.nwlink.com [209.20.133.208]) by concorde.inria.fr (8.11.1/8.10.0) with SMTP id f5DKo3T09837 for ; Wed, 13 Jun 2001 22:50:04 +0200 (MET DST) Received: (qmail 26526 invoked by uid 500); 13 Jun 2001 20:50:03 -0000 Date: Wed, 13 Jun 2001 13:50:03 -0700 From: leary@nwlink.com To: caml Subject: Re: [Caml-list] enums in OCaml? Message-ID: <20010613135003.K26204@jean> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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