From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Mark Shinwell <mshinwell@janestreet.com>
Cc: Thomas Refis <thomas.refis@gmail.com>,
Damien Doligez <damien.doligez@inria.fr>,
Alan Schmitt <alan.schmitt@polytechnique.org>,
OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] use of ";;" when teaching Ocaml
Date: Mon, 22 Jun 2015 18:30:59 +0200 [thread overview]
Message-ID: <1434990659.31996.30.camel@e130.lan.sumadev.de> (raw)
In-Reply-To: <CAM3Ki77U75Gb4iZQhPyXWCUyD_ghC9hDuYxh=Ms8hymfhat=jQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2375 bytes --]
Am Montag, den 22.06.2015, 17:07 +0100 schrieb Mark Shinwell:
> I've heard the argument of Gerd from various people on many occasions.
> Personally, I don't buy it; I think the situation where the error
> message is deficient doesn't happen very often, whereas ";;" is
> syntactic clutter that I have to see every day (and would rather not
> see).
Note that I personally normally don't use ;; because I am very aware of
the problem and fluent enough in the OCaml syntax to help myself. I was
mentioning this point because beginners are not fluent, and they will
run into the problem of getting syntax errors where everything looks
alright.
Also, I actually don't see why not using ";;" is considered cleaner.
It's a bit like writing sentences without full stop (and I think the
analogy to natural languages is quite insightful because there you also
have the situation of open-ended syntactical constructions, and nobody
complains when authors use "." to mark the end of sentences). After all,
it's a matter of preference and practical usefulness.
As a side note, the situation would be different if the compiler emitted
warnings about obviously wrong indentation, because the information
where the writer thinks that a new definition begins is also already
included in the indentation.
Gerd
>
> Mark
>
> On 22 June 2015 at 16:56, Thomas Refis <thomas.refis@gmail.com> wrote:
> > 2015-06-22 16:48 GMT+01:00 Damien Doligez <damien.doligez@inria.fr>:
> >> Gerd has totally nailed it, and that's the reason why I always use ;;
> >> in my code.
> >> If we had another keyword for toplevel let (let without in) the
> >> situation would be quite different.
> >
> > http://caml.inria.fr/pub/docs/manual-camlp4/manual007.html !
> >
> > --
> > Caml-list mailing list. Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de
My OCaml site: http://www.camlcity.org
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-22 16:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 13:31 Alan Schmitt
2015-06-22 13:52 ` Ivan Gotovchits
2015-06-22 13:53 ` Daniil Baturin
2015-06-22 14:19 ` Gerd Stolpmann
2015-06-22 15:48 ` Damien Doligez
2015-06-22 15:56 ` Thomas Refis
2015-06-22 16:07 ` Mark Shinwell
2015-06-22 16:30 ` Gerd Stolpmann [this message]
2015-06-22 16:47 ` Mark Shinwell
2015-06-22 17:08 ` Daniel Bünzli
2015-06-22 18:56 ` Gerd Stolpmann
2015-06-22 17:18 ` Török Edwin
2015-06-22 17:42 ` Francois Berenger
2015-06-22 17:46 ` Ivan Gotovchits
2015-06-22 17:53 ` John Whitington
2015-06-22 16:07 ` Pippijn van Steenhoven
2015-06-22 16:25 ` Daniel Bünzli
2015-06-22 18:18 ` Steve Zdancewic
2015-06-22 16:42 ` Thomas Refis
2015-06-22 16:47 ` David House
2015-06-22 17:08 ` Daniil Baturin
2015-06-22 17:04 ` Daniel Bünzli
2015-06-22 23:41 ` Philippe Wang
2015-06-23 1:15 ` Kenichi Asai
2015-06-23 13:27 ` Alan Schmitt
2015-06-23 13:35 ` Ivan Gotovchits
2015-06-23 13:36 ` Ivan Gotovchits
2015-06-25 16:51 ` Philippe Wang
2015-06-29 0:12 ` Philippe Wang
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=1434990659.31996.30.camel@e130.lan.sumadev.de \
--to=info@gerd-stolpmann.de \
--cc=alan.schmitt@polytechnique.org \
--cc=caml-list@inria.fr \
--cc=damien.doligez@inria.fr \
--cc=mshinwell@janestreet.com \
--cc=thomas.refis@gmail.com \
/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