world as value

Rolf-Thomas Happe rthappe@mathematik.uni-freiburg.de
Fri, 18 Jun 1999 20:08:00 +0200 (MDT)


> To make things clear: For me a model of the *World type is a set of values,
> which are mathematical objects (e.g. a set, relation, graph, number). Assigning
> semantics to a function that operates on the *World means constructing a
> function in the usual mathematical manner.
[...]
> The most important thing for me is: We API designers for i/o functions have it
> in our hand. We should be careful. It's very easy to implement a function that
> returns the current operating system time. It can be done in ten minutes. But
> the consequences for the semantic are immense. On the other hand, if we try to
> offer only functions, that lead to an easy semantic, then people might complain,
> they are not powerful enough. What a tradeoff.

In the absence of a model of the *World, the meaning of an expression such as
"(world1,ok) = hello world0" can be described informally (*) by a relation R
between the arguments and the result.  The graph of R should be a sufficiently
tight superset of the graph of the opaque function hello, i.e. I want to be able
to conclude from ok==True, that I helloed the world successfully.  
   Do you think that a model of the *World would make complex Clean programs
more intelligible?  The merit of a Clean semantics for the I/O functions
is not that obvious to me.  (Maybe it's just lack of education.  The question
is not rhethorical, though.) 

(*) informally insofar as this description talks about printers, screens, etc.
    rather than mathematical objects (functions)

rthappe