From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0121ABB81 for ; Mon, 13 Dec 2004 17:54:04 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBDGs3Og021379 for ; Mon, 13 Dec 2004 17:54:03 +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 RAA06864 for ; Mon, 13 Dec 2004 17:54:03 +0100 (MET) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBDGs1Xu021888 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 13 Dec 2004 17:54:02 +0100 Received: from qrczak by qrnik.knm.org.pl with local (Exim 3.36 #1) id 1CdtST-0002S6-00 for caml-list@inria.fr; Mon, 13 Dec 2004 17:54:01 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] environment idiom X-Face: OW>RV&gN+&b-aiNY|U)f=S%w+/rK!);f>/W9IXg})]&F>ht.1Up8@04+_!gOp(_/l_-+E^. 2\vI)1=D,%HWiq)r(M/V~dr^5T^KF/[w5YZ4<0Sus3+O>l3uA/&W_21m?.s,Po8{pb0@ References: <877e9a170412121844b633bb8@mail.gmail.com> <877e9a1704121218456af9df9@mail.gmail.com> <20041213.182117.79057361.garrigue@math.nagoya-u.ac.jp> <1102944153.2578.234.camel@pelican.wigram> From: "Marcin 'Qrczak' Kowalczyk" Mail-Followup-To: caml-list@inria.fr Date: Mon, 13 Dec 2004 17:54:01 +0100 In-Reply-To: <1102944153.2578.234.camel@pelican.wigram> (skaller@users.sourceforge.net's message of "14 Dec 2004 00:22:34 +1100") Message-ID: <87acsiqguu.fsf@qrnik.zagroda> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: "Marcin 'Qrczak' Kowalczyk" X-Miltered: at concorde with ID 41BDC92B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41BDC929.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 evidently:01 haskell:01 haskell's:01 threading:01 ...:98 equality:01 writes:01 abstract:01 idiom:01 functions:01 substitution:02 similarly:03 depends:04 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: skaller writes: >> Referential transparency is about the substitution of definitions. >> Evidently, x <- ... is _not_ a definition. > > But this is a bit circular. But it's true. Referential transparency is relative to what is considered a definition. It's not an absolute property if we don't agree about the mapping between abstract concepts like "definition" or "equality" and the features visible in the language. Similarly, whether a function is considered pure depends on what do we mean to "apply" a function, and what is a "side effect". For example Haskell IO actions don't break purity if we consider Haskell's function application as the operation which determines purity, but they are impure if we treat IO and functions together. And a function which returns a modified state is pure if we treat the state as one of the arguments and a part of the result, yet it's impure if we consider only other arguments as "real" arguments and treat state threading as a part of the calling protocol. It's all relative. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/