Browse thread
[Caml-list] semi-colons and begin
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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
most
ones. I am really glad that Emacs indents correctly, and that makes the
following
What you see:
if blahblah then
let x = e in
thing1;
thing2;
thing3;
What you get:
if blahblah then
let x = e in
thing1;
thing2;
thing3;
code correctly, since Emacs will indent it the second way. In Python
indentation
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,
sometimes
and the destination). Whould it be possible to pinpoint the error more
exactly
or is there a reason that in
let _ = 1+2;
let _ = 2
let _ = 4
we get a syntax error at the last 'let'?
/mattias
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr