caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Francisco Valverde Albacete" <fva@tsc.uc3m.es>
To: leary@nwlink.com
Cc: caml <caml-list@inria.fr>
Subject: Re: [Caml-list] enums in OCaml?
Date: Thu, 14 Jun 2001 11:12:40 +0200	[thread overview]
Message-ID: <3B288008.F99031E5@tsc.uc3m.es> (raw)
In-Reply-To: <20010614011550.A28578@jean>

Hi there,

I wouldn't like to be patronising in this, so please forgive if I don't use as many
emoticons as I should be doing... ;)

leary@nwlink.com wrote:

> So, what's so wrong with just using variables?
>
> let Accel = 1;;
> let Stop = 0;;
>
> seems pretty short to write and shortest to use...  Am I missing something
> ( elegant | obvious )?  Is that just ugly?

I gather you are learning the language... If it is because you want to try
something new or want to check some of the publicised "good" qualities of FP, why
don't you try to code your type in *both* styles, one using constants and the other
sum types and then make a better-informed decision?

As long as you are at it, also, why not make it into a tutorial for the coding of
such types? We seem to be short on tutorials in Ocaml...

Regards, and best of luck... I hope you see the light (and start coding in Ocaml!
:) )

        Francisco Valverde
        Univ. Carlos III de Madrid


-------------------
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


  parent reply	other threads:[~2001-06-14  9:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-13  2:21 leary
2001-06-13  7:37 ` David Mentre
2001-06-13  8:20   ` leary
     [not found] ` <200106130751.f5D7pbL11758@ionie.inria.fr>
2001-06-13  8:18   ` leary
2001-06-13  8:46     ` David Mentre
2001-06-14  8:15 ` leary
2001-06-14  8:41   ` Chris Hecker
2001-06-14  8:53   ` Jacques Garrigue
2001-06-14  9:12   ` Francisco Valverde Albacete [this message]
2001-06-14 13:04   ` Chris Quinn
2001-06-13 20:50 leary

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=3B288008.F99031E5@tsc.uc3m.es \
    --to=fva@tsc.uc3m.es \
    --cc=caml-list@inria.fr \
    --cc=leary@nwlink.com \
    /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).