From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 906A4BC1E for ; Mon, 13 Dec 2004 03:03:17 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBD23GYv016527 for ; Mon, 13 Dec 2004 03:03:17 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA11580 for ; Mon, 13 Dec 2004 03:03:16 +0100 (MET) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBD23FIH016522 for ; Mon, 13 Dec 2004 03:03:16 +0100 Received: by rproxy.gmail.com with SMTP id r35so1049656rna for ; Sun, 12 Dec 2004 18:03:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=WNdQd5AHovFD7iJRYOmkFiLuMkVT9js01DLeB/KM/V3FNSaecfHCId5HVsys4KN/bBXeWa1W2RAYfPeRbqSHB6zOaZbHPOwh3FBpybTkp1911VH4unlXnp8vF0UO/w7XCXnScang4V2syUY1AoQQyJzPAvPKdCnhv3EK1cg05KM= Received: by 10.38.76.13 with SMTP id y13mr2206870rna; Sun, 12 Dec 2004 18:03:14 -0800 (PST) Received: by 10.38.86.10 with HTTP; Sun, 12 Dec 2004 18:03:14 -0800 (PST) Message-ID: <877e9a17041212180365f76e4a@mail.gmail.com> Date: Sun, 12 Dec 2004 21:03:14 -0500 From: Michael Walter Reply-To: Michael Walter To: skaller@users.sourceforge.net Subject: Re: [Caml-list] environment idiom Cc: William Lovas , caml-list In-Reply-To: <1102898935.2768.88.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9410EC84C0872141B27A2726613EF45D02A52E08@psmrdcex01.psm.pin.safeco.com> <41B97FD7.50309@andrej.com> <1102732237.2611.580.camel@pelican.wigram> <41BB04D8.60405@andrej.com> <20041211181313.GA9656@fichte.ai.univie.ac.at> <1102809398.2611.637.camel@pelican.wigram> <20041212023636.GA12724@force.stwing.upenn.edu> <1102829608.2768.77.camel@pelican.wigram> <877e9a170412121109ec02d44@mail.gmail.com> <1102898935.2768.88.camel@pelican.wigram> X-Miltered: at nez-perce with ID 41BCF864.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41BCF863.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 wrote:01 monadic:01 model:01 monadic:01 cheers:01 idiom:01 emulate:01 dec:03 impure:05 impure:05 problem:05 probably:05 stressing:07 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: On 13 Dec 2004 11:48:55 +1100, skaller wrote: > So the monadic model is good, because it plainly separates > the 'purely functional' non-monadic code, from the > monadic code, which admits two distinct views -- at the lower > level it is pure, whilst the higher level interpretation > might not be -- depending both on the monad being used, > and also how it is used. It is probably better to say "from the outside it is pure, and inside it appears impure, relative to its boundary" (thus stressing the point that your apparent impurity is only a "view" ). I think the problem is that we are using "pure" twofold here: a) As an (absolute) property of the language b) As the property of code (which is relative to its environment) As you can obviously emulate impurity in a pure language (see State monad), and code pure in a impure language, it is not much of a surprise that b) can differ from a). Cheers, Michael