Version française
Home     About     Download     Resources     Contact us    
Browse thread
environment idiom
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Berger <martinb@d...>
Subject: Re: [Caml-list] environment idiom
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