From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9C910BB81 for ; Mon, 13 Dec 2004 12:31:14 +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 iBDBVE5J021971 for ; Mon, 13 Dec 2004 12:31:14 +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 MAA27415 for ; Mon, 13 Dec 2004 12:31:13 +0100 (MET) Received: from mail.dcs.qmul.ac.uk (vicar.dcs.qmul.ac.uk [138.37.95.146]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBDBVD9b027378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 13 Dec 2004 12:31:13 +0100 Received: from xenografia.plus.com ([212.159.85.26] helo=[192.168.7.2]) by mail.dcs.qmul.ac.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.43) id 1CdoQ4-0006eA-9c; Mon, 13 Dec 2004 11:31:13 +0000 Message-ID: <41BD7F27.1080407@dcs.qmul.ac.uk> Date: Mon, 13 Dec 2004 11:38:15 +0000 From: Martin Berger User-Agent: Mozilla Thunderbird 0.6 (X11/20040519) X-Accept-Language: en-us, en MIME-Version: 1.0 To: skaller@users.sourceforge.net, caml-list Subject: Re: [Caml-list] environment idiom 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> <1102901206.2768.127.camel@pelican.wigram> <1102935187.2578.85.camel@pelican.wigram> In-Reply-To: <1102935187.2578.85.camel@pelican.wigram> X-Enigmail-Version: 0.84.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-DCS-Interface-Port: 465 X-DCS-Auth-User: martinb X-DCS-clamav-result: clean (1CdoQ4-0006eA-9c) X-DCS-uvscan-result: clean (1CdoQ4-0006eA-9c) X-Miltered: at concorde with ID 41BD7D82.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41BD7D81.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; dcs:01 qmul:01 caml-list:01 monadic:01 monadic:01 typable:01 idiom:01 typing:01 meaningless:01 behaviour:01 external:02 functional:02 functional:02 types:02 discipline:03 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=none autolearn=disabled version=3.0.0 X-Spam-Level: it is quite simple: of course the monadic IO that has been discussed has side-effects. hence it is not funcitonal. but -- and that's a big but -- what the monadic types do is: LIMIT composability in a way that no typable context can OBSERVE the statefulness of the monadic code. an external observer, not bound to the typing discipline, can observe the stateful behaviour. more generally: the question of whether a code fragment is functional or not is meaningless without specifying the class of admissable observations, i.e. the class of admissible context. any programming language becomes functional for example if the class of contexts is generated by C[.] ::= SKIP | x := n | [.] or something silly like that. martin