From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 216ABBC69 for ; Wed, 28 Mar 2007 16:34:34 +0200 (CEST) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2SEYWN6012770 for ; Wed, 28 Mar 2007 16:34:33 +0200 Received: by an-out-0708.google.com with SMTP id c24so2706225ana for ; Wed, 28 Mar 2007 07:34:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kpGN/9Ci5aU6omVxIhZRXMlzZKDsu0aDGzCRViPyRT4oyuDjXTeAcu3jRlCMPYT43mF39Ng+urqRwDYWd2SPWAzfp1IxrvzGTYIIANDr6J5lGfGFkZ/H90HZp6XaiqHCfwekqCxfLdtEWJEK3dXHDuL3E2PMe1iHwpVpsIU6z+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NlzLylDaFKYt6MVcpqt9wS3gVe9JAlBhcmF1UfXD+1N9koYfZpyu8FUowBC7Fvru4DmX8lrkv9bpbsX1yJ+o7QMr4OlM4+2/MrBaLvdpe7lyCz+7GWlcO5Cs38QxMCTLi8bVkp8CFpIM0ywbcILGSOB+2SbxU0RUDSEwVxoZfjY= Received: by 10.100.142.12 with SMTP id p12mr241767and.1175092472008; Wed, 28 Mar 2007 07:34:32 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Wed, 28 Mar 2007 07:34:31 -0700 (PDT) Message-ID: <6f9f8f4a0703280734p49ed0b7fk48787a8ba3a76e9e@mail.gmail.com> Date: Wed, 28 Mar 2007 16:34:31 +0200 From: "Loup Vaillant" To: "Luc Maranget" Subject: Re: [Caml-list] How must we teach lexical scope? Cc: caml-list@yquem.inria.fr In-Reply-To: <20070328084955.GA21199@yquem.inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0703280059m5b9af3a1t3a9541b772af98bb@mail.gmail.com> <20070328084955.GA21199@yquem.inria.fr> X-j-chkmail-Score: MSGID : 460A7CF8.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460A7CF8.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; maranget:01 maranget:01 28,:98 blog:98 luc:01 luc:01 lexical:01 lexical:01 caml-list:01 functional:02 scope:03 scope:03 programming:03 programming:03 inria:06 2007/3/28, Luc Maranget : > > So here are a few questions: > > -> Is lexical scope that important when learning pure functional > > programming? > > -> Are environments helpful (even the slightest bit) when teaching > > lexical scope? > > -> Where does this idea come from? I have not read a single book, as > > single article nor blog talking about environments. > > -> How can we teach lexical scope? Is there a simple solution, the > > kind of a first year student can understand in less than an hour? > > An attempt to answer your question 1. OK, It was about the implementation of first class function in a Pascal like language. Personally, I think environments are about the implementation of lexical scope, not its specifications. Therefore, teaching them in the first year of a programming course is premature. I may be wrong, so I am trying to verify that. Loup