On Mon 11 Oct, Lars Lundgren wrote:
> They also wrote "[The monadic IO approach] over determines order of
> evaluation". I'm a bit puzzled about that statement. Is it true? Comments
> anyone?
I think (but could be wrong) that it was a reference to the the
multiple environments approach, where the world is conceptually composed
of independent sub-worlds which may be manipulated concurrently
but maintain deterministic behaviour.
e.g. a file is a sub-world which can be opened from the main world
something like this..
fopen :: String -> Int -> *World -> (Bool,*File,*World)
and closed..
fclose :: *File -> *World -) (Bool,*World)
so in a 'let before' expression (a bit like haskell do)..
# (_,myfile,world) = fopen "myfile.txt" FWriteText world
myfile = do_something_to_file myfile
world = do_something_to_world world
(_,world) = fclose myfile world
..
do_something_to_file and do_something_to_world can be performed
concurrently, but we still have a deterministic program (assuming
the sub-worlds really are independent).
So, I think..
Clean is good for deterministic concurrency.
Haskell is good for deterministic sequentiality.
Concurrent Haskell is good for non-deterministic concurrency.
Regards
--
Adrian Hey