From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 43DD87EEEF for ; Mon, 22 Jun 2015 19:46:16 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.217.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of ivg@ieee.org designates 209.85.217.180 as permitted sender) identity=mailfrom; client-ip=209.85.217.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f180.google.com) identity=helo; client-ip=209.85.217.180; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-lb0-f180.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BXAQD/SIhVm7TZVdFcg2RfBoMYqEcGkQmCf4YAAoE0B0wBAQEBAQESAQEBAQEGCwsJIS6EIgEBAQMBEhFWBQsLBAcNKgICIhIBBQEcBhMiiAUIqD0+MYs/lhsBAQEBAQUBAQEBAR0KhhGFKoUGB4JogUMFk32EVoZ4gTpBkluCERIjgRUXhCQiMYJIAQEB X-IPAS-Result: A0BXAQD/SIhVm7TZVdFcg2RfBoMYqEcGkQmCf4YAAoE0B0wBAQEBAQESAQEBAQEGCwsJIS6EIgEBAQMBEhFWBQsLBAcNKgICIhIBBQEcBhMiiAUIqD0+MYs/lhsBAQEBAQUBAQEBAR0KhhGFKoUGB4JogUMFk32EVoZ4gTpBkluCERIjgRUXhCQiMYJIAQEB X-IronPort-AV: E=Sophos;i="5.13,660,1427752800"; d="scan'208";a="166697711" Received: from mail-lb0-f180.google.com ([209.85.217.180]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Jun 2015 19:46:15 +0200 Received: by lbbpo10 with SMTP id po10so13860461lbb.3 for ; Mon, 22 Jun 2015 10:46:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zDvtHLWCrIJp+zCc26w8OycEcm52HulSpKs7+0IBQqA=; b=i+uSmlehNd26gXvPka/+CsIOXi3X94TSb/DFTQV4TNSGa0WLKyNQZvui2iCqYTQD5z YGXDTjpj2WzR8Qsp2I+nsGz+U4aDE2c4ZLXMzaCMc0XvwDgdnb1JF7eB+CaLAlO6feHO oAo/iOzZoccom2/lD6LEwa3ooeLlud2JTzNyuP5T6iR2XVvMrTN7IZqMAGgOHCHmGqgh E+vCnLSFDcZ9gK0ZCrDNPjfx1caTysbhHrtv/lHNcBVWbSiz1rGM+o9LfqgSW5mKGDIY 31bFruEJeqUgy8xGaHSYxZTpKpzcgtTW6xiIuFrnszcG4Mh44CtfU1HDcc9Z/8FKwmVv +YMg== X-Gm-Message-State: ALoCoQkidZs+Bhj4JNLbvH1zSSsqClQqjgvRb8d8TrJrTANb4wdZICy8cTZxIfgE5FOVRBPleKX/ MIME-Version: 1.0 X-Received: by 10.152.206.75 with SMTP id lm11mr30548266lac.41.1434995174843; Mon, 22 Jun 2015 10:46:14 -0700 (PDT) Received: by 10.114.26.99 with HTTP; Mon, 22 Jun 2015 10:46:14 -0700 (PDT) In-Reply-To: <5588490B.3010402@inria.fr> References: <1434982765.31996.19.camel@e130.lan.sumadev.de> <5588490B.3010402@inria.fr> Date: Mon, 22 Jun 2015 13:46:14 -0400 Message-ID: From: Ivan Gotovchits To: Francois Berenger Cc: caml-list Content-Type: multipart/alternative; boundary=001a1133bdc6a6c62605191ed907 Subject: Re: [Caml-list] use of ";;" when teaching Ocaml --001a1133bdc6a6c62605191ed907 Content-Type: text/plain; charset=UTF-8 On Mon, Jun 22, 2015 at 1:42 PM, Francois Berenger < francois.berenger@inria.fr> wrote: > On 06/22/2015 06:07 PM, Mark Shinwell wrote: > >> 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). >> >> Mark >> > > I am curious. > How do you make this file compile without ';;' in it ? > > # cat src/test.ml > --- > let main () = > failwith "not implemented yet" > ;; > > main () > --- > > I always use ';;' just for that use case. > I really don't know if there is another way that fits a single file. An idiomatic way is to write: let () = main () Your example is particular case, showing why `;;` is bad. Because it forces compiler to take code that is not in ocaml syntax. --001a1133bdc6a6c62605191ed907 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Jun 22, 2015 at 1:42 PM, Francois Berenger &l= t;francois.= berenger@inria.fr> wrote:
<= span class=3D"">On 06/22/2015 06:07 PM, Mark Shinwell wrote:
I've heard the argument of Gerd from various people on many occasions.<= br> 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).

Mark

I am curious.
How do you make this file compile without ';;' in it ?

# cat src/t= est.ml
---
let main () =3D
=C2=A0 failwith "not implemented yet"
;;

main ()
---

I always use ';;' just for that use case.
I really don't know if there is another way that fits a single file.

An idiomatic way is to write:

<= /div>
=C2=A0 =C2=A0 let () =3D main ()

Your ex= ample is particular case, showing why `;;` is bad. Because it forces compil= er to take=C2=A0
code that is not in ocaml syntax.=C2=A0
--001a1133bdc6a6c62605191ed907--