From: Edgar Friendly <thelema314@gmail.com>
To: david.baelde@ens-lyon.org, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] New emacs tuareg mode
Date: Thu, 27 May 2010 09:01:26 -0700 [thread overview]
Message-ID: <4BFE9756.7010401@gmail.com> (raw)
In-Reply-To: <AANLkTilHVyK36kPZnLfU0yZU7lwBEFx8SPPXgQz1C-o9@mail.gmail.com>
On 05/27/2010 02:46 AM, David Baelde wrote:
> For example:
>
> if blah then
> let () = f () in
> g () ;
> h ()
>
> is not the same as
>
> if blah then
> f () ;
> g () ;
> h ()
>
>
This difference is only because of (what I perceive as) flaws in the
[if]/[then] syntax. Namely that semicolon-delimited chains of
expressions don't parse within the [then] or [else] sections without
extra bracketing. This lets adding a bit of debug code (in if/then -
exactly where it's usually needed) to totally break the semantics by
pushing code outside the if/then expression. With improper indentation
(like your second example), one can make it look like one thing is
happening while another will happen.
Your first code block is a good example of non indented [let] blocks
looking good. Your second example should be indented as follows to
clarify its actual structure:
if blah then
f () ;
g () ;
h ()
E
next prev parent reply other threads:[~2010-05-27 16:01 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-24 16:36 new emacs tuareg mode release Sam Steingold
2010-05-24 16:55 ` [Caml-list] " Stéphane Glondu
2010-05-24 17:17 ` Sam Steingold
2010-05-24 18:41 ` Philip
2010-05-24 20:09 ` Sam Steingold
2010-05-24 20:36 ` Philip
2010-05-24 20:58 ` Sam Steingold
2010-05-25 1:00 ` Eliot Handelman
2010-05-25 10:17 ` Jan Rehders
2010-05-25 18:04 ` Sam Steingold
2010-05-26 6:27 ` Stéphane Glondu
2010-05-26 13:33 ` Sam Steingold
2010-05-26 14:31 ` New emacs tuareg mode Christophe TROESTLER
2010-05-26 15:36 ` [Caml-list] " Daniel Bünzli
2010-05-26 16:01 ` Christophe TROESTLER
2010-05-26 16:34 ` Stefano Zacchiroli
2010-05-27 9:46 ` David Baelde
2010-05-27 14:25 ` Eray Ozkural
2010-05-27 15:41 ` Grant Rettke
2010-05-27 16:01 ` Edgar Friendly [this message]
2010-05-29 13:16 ` David Baelde
2010-05-24 20:34 ` [Caml-list] new emacs tuareg mode release blue storm
2010-05-26 10:02 ` Tom Hutchinson
2010-05-26 13:18 ` Eliot Handelman
2010-05-26 13:32 ` Jacques Garrigue
2010-05-26 13:33 ` Mehdi Dogguy
2010-05-26 14:01 ` Christophe TROESTLER
2010-05-26 14:09 ` Mehdi Dogguy
2010-05-24 21:44 ` Sam Steingold
2010-05-25 18:08 ` [Caml-list] " Mehdi Dogguy
2010-05-25 18:25 ` Christophe TROESTLER
2010-05-24 21:50 ` Sam Steingold
2010-05-26 22:53 ` Sam Steingold
2010-06-11 12:22 ` [Caml-list] " Albert Cohen
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=4BFE9756.7010401@gmail.com \
--to=thelema314@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=david.baelde@ens-lyon.org \
/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