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] re: help with ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] re: help with ocaml

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

There is a page of ocaml reference manual about names:

Jean-Christophe Filliatre
Bug reports:  FAQ:
To unsubscribe, mail  Archives: