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-25 (21:39)
From: John Prevost <jmp@a...>
Subject: Re: Ref syntax
>>>>> "pb" == Pascal Brisset <brisset@recherche.enac.fr> writes:

    pb> On my wish list, I put a "-strict" option for ocamlc which
    pb> would remove freedom in the syntax. For example

    pb> - ";" means "sequence" and not "end of expr" (it is currently
    pb>   allowed before "end" in a block)

    pb> - "|" means "or" or "start of pattern" but not both

What do you mean?  In terms of "or patterns"?

    pb> - ";;" is compulsory

Oh god no.  Please, no.  I believe that if anything, strict syntax
should not allow ";;".  It's only necessary if you write imperative
things at the top level, and even then, I believe it's preferable to
use "let _ = ...".  If you're aiming to make things clearer, get rid
of it totally.

    pb> - deprecated "&" and "or" operators removed

So only && and ||?  That's somewhat reasonable.

But please, no, never encourage anybody to use ;;!