world as value

letz@rd.grame.fr letz@rd.grame.fr
Tue, 15 Jun 1999 18:23:49 +0200


>
>There is a big and essential difference between the two. In real life Clean,
>as in the latter of your two examples, the program is PROVIDED with a world
>value. You cannot completely specify its contents, as in your first example.
>So each time you run a Clean program, it is provided with a potentially
>different world value. Together with the idea that this different world
>could contain a different list of Booleans (see above), this prevents you
>from proving that different runs of the program should return the same value
>of i, or that i should either be 0 or 100000000.
>
>> The model is wrong.
>>
>Indeed. The two steps you took (one: reducing the *World to just *Files,
>two: switching from an unspecified world value PROVIDED to the program, to a
>value that is completely specified within the program) seem unjustified to
>me.
>
>I hope this somehow helps to get a better understanding of Clean IO.
>
>Regards Erik Zuurbier


There is something that remains not clear for me. In a context of a
functional program doing I/O  what is the correct notion of value?
Is it the "I/O program" itself  (to be applied to the *World object)  OR
the result of the interaction of the I/O program on the *World object?
It seems that to keep referential tranparency only  the second  solution is
correct.


Stephane Letz


Grame: Centre National de creation musicale
9, Rue du Garet
69001 Lyon
Tel: 04-72-07-37-00
Fax: 04-72-07-37-01
Web: www.grame.fr