From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 0F53A7EEEF for ; Mon, 22 Jun 2015 18:42:53 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of refis.thomas@gmail.com) identity=pra; client-ip=209.85.212.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="refis.thomas@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of refis.thomas@gmail.com designates 209.85.212.174 as permitted sender) identity=mailfrom; client-ip=209.85.212.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="refis.thomas@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f174.google.com) identity=helo; client-ip=209.85.212.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="refis.thomas@gmail.com"; x-sender="postmaster@mail-wi0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DwAQABOohVlK7UVdFchEMGgxiwLJNeB0wBAQEBAQESAQEBAQcLCwkfMIQjAQEEEhEdARsdAQMMAQUFCwMMAiYCAiIBEQEFARwGEyKFW4IcAQMSqCw+MYs/gWuCeYp+ChknDVeFBAElAQUOgROKJId1gUMFk32JcIFegTqTHIIREiOBDAkXSYNAPTGCSAEBAQ X-IPAS-Result: A0DwAQABOohVlK7UVdFchEMGgxiwLJNeB0wBAQEBAQESAQEBAQcLCwkfMIQjAQEEEhEdARsdAQMMAQUFCwMMAiYCAiIBEQEFARwGEyKFW4IcAQMSqCw+MYs/gWuCeYp+ChknDVeFBAElAQUOgROKJId1gUMFk32JcIFegTqTHIIREiOBDAkXSYNAPTGCSAEBAQ X-IronPort-AV: E=Sophos;i="5.13,660,1427752800"; d="scan'208";a="137366695" Received: from mail-wi0-f174.google.com ([209.85.212.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 22 Jun 2015 18:42:52 +0200 Received: by wicnd19 with SMTP id nd19so82266983wic.1 for ; Mon, 22 Jun 2015 09:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=MRIPY4qGcZPcLNFrKHXbtpTc50HNCwu+v/qYpBybl9k=; b=iK9Krd+ALlj+dWbjjxhG8+UUfautx6IgyxOhzT+UXvqhDPD39COXSRlrYYeU9RMpde SJCPGcvS96iXSdiZpWnIomp/1ZNnERqei+bs8bGJ4wqxJhIhl6K3f0OBEbb76V0qHFTi +Z2WJxI0gyyGPbZwGTYUtGNJRDQsDiFJSL9PeWHm+sVOjtrRHcPGOCEjQz7Gh0IUoja8 eeUZQXqTp2cilxadmxJUSoW7az9Lk2S2K2qFCtTg4BOI5PiHbgFx+yMs2zSeRx0KA72V qmSKwVH7gh5nyuF0/wBXBOZcTREz6gyNNlSq8EiWz6/Lm6kQW1EzMHqQBmpdsCpykDa1 BNww== MIME-Version: 1.0 X-Received: by 10.180.104.167 with SMTP id gf7mr34091014wib.3.1434991372194; Mon, 22 Jun 2015 09:42:52 -0700 (PDT) Sender: refis.thomas@gmail.com Received: by 10.180.77.111 with HTTP; Mon, 22 Jun 2015 09:42:52 -0700 (PDT) In-Reply-To: <1434982765.31996.19.camel@e130.lan.sumadev.de> References: <1434982765.31996.19.camel@e130.lan.sumadev.de> Date: Mon, 22 Jun 2015 17:42:52 +0100 X-Google-Sender-Auth: 7V7XM0wlGlOXBKuldrEq9XkMcys Message-ID: From: Thomas Refis To: Gerd Stolpmann Cc: Alan Schmitt , OCaml Mailing List Content-Type: text/plain; charset=UTF-8 X-Validation-by: thomas.refis@gmail.com Subject: Re: [Caml-list] use of ";;" when teaching Ocaml 2015-06-22 15:19 GMT+01:00 Gerd Stolpmann : > There is one downside of not using ";;", namely that you sometimes get > syntax errors much later than necessary. E.g. in > > let x = > do_this(); > do_that(); > let y = 6 > let z = > do_third_thing() > > you get the syntax error at the position of the third "let" although it > is the extra semicolon at the end of the first definition. This can be > very confusing, and it is a very good reason to use ";;" outside the > toplevel. IMHO it is better to be honest about this issue. Because "let" > is an open-ended construction the ";;" can be useful as end marker, and > the compiler emits better error messages with more precise locations. The argument seems a bit weak. The example is (if I understand correctly): "I have a trailing semicolon which the compiler doesn't report properly but instead tells me there is a syntax error in a completely unrelated place! If you place double semicolons in your code, that doesn't happen!". But it could also be understood as: "I usually place double semicolons, but in this case I forgot. And the compiler doesn't report this properly but instead tells me there is a syntax error in a completely unrelated place!". You face the same problem either way, you still have to be "fluent" to know where to look when you encounter this error. And I'd guess a beginner is as likely to forget the ";;" as to leave a trailing ";".