Browse thread
environment idiom
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-12-12 (19:09) |
From: | Michael Walter <michael.walter@g...> |
Subject: | Re: [Caml-list] environment idiom |
On 12 Dec 2004 16:33:29 +1100, skaller <skaller@users.sourceforge.net> wrote: > Yes, that indeed is my intention. Basically, any non-transparent > non-function code can be made purely functional and transparent > with a simple transformation, yet it doesn't by this transformation > get any easier to reason about the code. Well, actually monadic I/O makes is easier to reason about code than languages which allow for non-transparent side effects in functions. I think you were making a really good argument pro monads yourself -- in your C interpreter monad you can easily see what's making use of the C interpreter (any function "in"/lifted to the C interpreter monad), and what's not. Same for I/O -- you can assume that only functions "in"/lifted to the IO monad (simply said, every value of type IO a) are able to do I/O. This clearly allows easier reasoning about code. - Michael