English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Type annotations
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-12-22 (14:06)
From: Pascal Brisset <brisset@r...>
Subject: Re: Ref syntax
> * addition of let mutable ... in
>        let mutable x = 0 in
>        for i = 1 to do x <- x + i done;
>        x

 Unfortunately, it violates the simple ``rule'' which says that there
must be a dot (.) on the left side of a left arrow (<-). I like this
kind of simple rule which can be taught to beginners and help
debugging their programs.

 On my wish list, I put a "-strict" option for ocamlc which would
remove freedom in the syntax. For example
 - ";" means "sequence" and not "end of expr" (it is currently allowed
before "end" in a block)
 - "|" means "or" or "start of pattern" but not both
 - ";;" is compulsory
 - deprecated "&" and "or" operators removed
 - ...