caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
To: "Bauer, Robert" <rbauer@rational.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] re: help with ocaml
Date: Fri, 29 Jun 2001 09:10:26 +0200 (MEST)	[thread overview]
Message-ID: <15164.10722.844314.565021@pc803> (raw)
In-Reply-To: <A3AF185A9D48B3489F7CD9FE0F6E63A0DCC78C@sus-ca3it10>


Bauer, Robert writes:
 > 
 > Also, I find that if try to use any capitalized variables, I get interesting
 > errors - for
 > example if I try let XYZ_ZYX = (false, false);; I get an error, whereas let
 > xyz_zyx = (false, false);;
 > works just fine. Or more simply, let XYZ = (false, false);; fails.  Again, I
 > am hoping for an explanation.

Ocaml distinguishes between capitalized and uncapitalized identifiers.
The former are used for  constructors, exceptions and modules, and the
latter for other kinds (values, types, etc.)

This helps  avoiding trivial mistakes,  like mispelling the name  of a
constructor (which  would therefore be  understood as a  variable). It
also  helps  when  reading  third-party  code, since  you  can  easily
discriminate between constructors and functions in an application, for
instance.

There is a page of ocaml reference manual about names:

      http://caml.inria.fr/ocaml/htmlman/manual010.html

Sincerely,
-- 
Jean-Christophe Filliatre
  mailto:Jean-Christophe.Filliatre@lri.fr
  http://www.lri.fr/~filliatr
-------------------
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


      reply	other threads:[~2001-06-29  7:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-28 16:00 Bauer, Robert
2001-06-29  7:10 ` Jean-Christophe Filliatre [this message]

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=15164.10722.844314.565021@pc803 \
    --to=jean-christophe.filliatre@lri.fr \
    --cc=caml-list@inria.fr \
    --cc=rbauer@rational.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).