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 1D1167EEFA for ; Tue, 23 Jun 2015 15:35:35 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=209.85.215.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ivg@ieee.org designates 209.85.215.44 as permitted sender) identity=mailfrom; client-ip=209.85.215.44; receiver=mail3-smtp-sop.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 (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f44.google.com) identity=helo; client-ip=209.85.215.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ivg@ieee.org"; x-sender="postmaster@mail-la0-f44.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ApAgBTYIlVmyzXVdFbhEMGgxioIAaRCYh/AoFCB0wBAQEBAQESAQEBAQEGCwsJIS5BA4NfAQEDARIRVgULCwQHNwICIhIBBQEcBhMIGogFCKlKPjGLP5ZEAQEBAQEBBAEBAQEBHQqGEoUuhC0HAQFQB4JogUMFk3+LUYE6kyCCERIjgRUXhCUiMYEDCReBJQEBAQ X-IPAS-Result: A0ApAgBTYIlVmyzXVdFbhEMGgxioIAaRCYh/AoFCB0wBAQEBAQESAQEBAQEGCwsJIS5BA4NfAQEDARIRVgULCwQHNwICIhIBBQEcBhMIGogFCKlKPjGLP5ZEAQEBAQEBBAEBAQEBHQqGEoUuhC0HAQFQB4JogUMFk3+LUYE6kyCCERIjgRUXhCUiMYEDCReBJQEBAQ X-IronPort-AV: E=Sophos;i="5.13,665,1427752800"; d="scan'208";a="137504781" Received: from mail-la0-f44.google.com ([209.85.215.44]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 23 Jun 2015 15:35:15 +0200 Received: by laka10 with SMTP id a10so6725776lak.0 for ; Tue, 23 Jun 2015 06:35: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=0N4uGPguGyyy7eppSVX2L7x9h7iwgG0n7ZDJKskqgAQ=; b=MKoBcebrIuHswRLcEVHtZwX8CEdIF53oK6c5j9ZC0Laz1GyTbopJ8nXLVwrIFOxDpa 6tup+wSiZJ42P8yAKMha1b+myXb09PfzI2nS3g6nbg+BWuqbwduQi2vpKTyQA69EEM8R 7VjxSMC8vATkj8ZvaizYhowN8dinsK90oRhVSL4Y2rfZktyTbtTfrmkM8APNd2IjgRY0 +EuoLqIy5KaoZguXdLExcep1oLNYnwiwa76aIy9TwMm5T/OjR237Zu8I/XLX3qKjry7g zQkVBRLlAKr2LPD3A9LxQw1I64AZe6KPK6RBPeXG9eesE95p4xUdEboIHImVQ5MzmewS qTNw== X-Gm-Message-State: ALoCoQkSZt9HU5gOQBfb239SG+ZwGyyCltYW9DoShDA5iihV7spSHPzVlpFRs7FIdlzow5hcA8bH MIME-Version: 1.0 X-Received: by 10.152.5.65 with SMTP id q1mr35187641laq.110.1435066514674; Tue, 23 Jun 2015 06:35:14 -0700 (PDT) Received: by 10.114.26.99 with HTTP; Tue, 23 Jun 2015 06:35:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 23 Jun 2015 09:35:14 -0400 Message-ID: From: Ivan Gotovchits To: Alan Schmitt Cc: Philippe Wang , OCaml Mailing List Content-Type: multipart/alternative; boundary=089e013d1754d62a8d05192f7547 Subject: Re: [Caml-list] use of ";;" when teaching Ocaml --089e013d1754d62a8d05192f7547 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Jun 23, 2015 at 9:27 AM, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > Hello, > > Thanks to everyone for your answers, this has given me much food for > thought. > > On 2015-06-23 01:41, Philippe Wang writes: > > > In my opinion, it's a lot more relevant to use a very limited and very > > simple subset of OCaml when teaching to beginners. And this subset > > does not involve expressions at top-level because it's not worth the > > trouble. > > I like this approach because it amounts to saying "one always starts > a phrase with 'let' or 'type'" (and later in the year there can be > 'open', 'module', 'include'). I sure can live without top-level > expressions. > > On the other hand, I also like the idea of terminating phrases, simply > because explaining when it terminates is not trivial otherwise, as > a 'let' may not be the beginning of a phrase. > > > Also, using the interactive top-level loop is, in my opinion, not good > > for beginners. It should only be presented to those who already > > understand very well the "core" of OCaml. The most frequent issue with > > the top-level loop is that it gets in the way of the notion of > > compiling a program, and it might give the false impression that OCaml > > can be interpreted. > > I am curious about this. My goal is to teach the language, and I find > that a REPL backed with a file works great to do this (using tuareg or > ocaml-top). What do you use to make sure students have a fast > compile/debug cycle? > You should take a look into ocaml-top [1]. It is a toplevel that doesn't require `;;` at all. > > Thanks again, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm > --089e013d1754d62a8d05192f7547 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Jun 23, 2015 at 9:27 AM, Alan Schmitt <alan.schmi= tt@polytechnique.org> wrote:

On 2015-06-23 01:41, Philippe Wang <mail@philippewang.info> writes:

> In my opinion, it's a lot more relevant to use a very limited and = very
> simple subset of OCaml when teaching to beginners. And this subset
> does not involve expressions at top-level because it's not worth t= he
> trouble.

I like this approach because it amounts to saying "one always s= tarts
a phrase with 'let' or 'type'" (and later in the year = there can be
'open', 'module', 'include'). I sure can live witho= ut top-level
expressions.

On the other hand, I also like the idea of terminating phrases, simply
because explaining when it terminates is not trivial otherwise, as
a 'let' may not be the beginning of a phrase.

> Also, using the interactive top-level loop is, in my opinion, not good=
> for beginners. It should only be presented to those who already
> understand very well the "core" of OCaml. The most frequent = issue with
> the top-level loop is that it gets in the way of the notion of
> compiling a program, and it might give the false impression that OCaml=
> can be interpreted.

I am curious about this. My goal is to teach the language, and I fin= d
that a REPL backed with a file works great to do this (using tuareg or
ocaml-top). What do you use to make sure students have a fast
compile/debug cycle?

You should take a = look into ocaml-top [1]. It is a toplevel that doesn't require `;;` at = all.



=C2=A0

Thanks again,

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO=E2=82=82 average (2015-05-30, Mauna Loa Observatory): 403.41 ppm<= br>

--089e013d1754d62a8d05192f7547--