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
[Caml-list] semi-colons and begin
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-04-05 (06:23)
From: Mattias Waldau <mattias.waldau@a...>
Subject: RE: [Caml-list] semi-colons and begin
There are a lot of problems with the Caml-syntax and I can live with the
ones. I am really glad that Emacs indents correctly, and that makes the

What you see:
   if blahblah then
      let x = e in
What you get:
   if blahblah then
      let x = e in

code correctly, since Emacs will indent it the second way. In Python
means something. It would be nice if the ocaml-compiler would complain if
indentation is inconsistent. In the example above thing2 and thing3 are
inconsistent intended since it should be on the same level as thing1.

Also, regarding if-then, I have learned to use begin/end.

My biggest problem is when the syntax error occurs in a completely different
location in the file, because it makes finding the bugs very difficult.
(I understand why the typechecker sometimes complains at the source,
and the destination). Whould it be possible to pinpoint the error more
or is there a reason that in

let _ = 1+2;

let _ = 2

let _ = 4

we get a syntax error at the last 'let'?


To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr