caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Mattias Waldau" <mattias.waldau@abc.se>
To: <caml-list@inria.fr>
Subject: RE: [Caml-list] semi-colons and begin
Date: Thu, 5 Apr 2001 08:23:01 +0200	[thread overview]
Message-ID: <AAEBJHFJOIPMMIILCEPBEEMNCHAA.mattias.waldau@abc.se> (raw)
In-Reply-To: <20010405055348.A4758@verdot.inria.fr>

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


  reply	other threads:[~2001-04-05  6:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-04 21:33 Chris Hecker
2001-04-04 22:40 ` Gerd Stolpmann
2001-04-04 23:32   ` Chris Hecker
2001-04-05  1:03     ` mahamud
2001-04-05  3:48       ` Brian Rogoff
2001-04-05  6:05       ` David Brown
2001-04-06  9:33     ` Gerd Stolpmann
2001-04-05  3:35 ` Michael Hicks
2001-04-05  3:53 ` Daniel de Rauglaudre
2001-04-05  6:23   ` Mattias Waldau [this message]
2001-04-05 17:34     ` Pierre Weis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AAEBJHFJOIPMMIILCEPBEEMNCHAA.mattias.waldau@abc.se \
    --to=mattias.waldau@abc.se \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).