performance of monads

Eric Allen Wohlstadter
Wed, 16 Jan 2002 00:02:45 -0800 (PST)

I see a lot of literature that says that monads "simulate" the effects of
imperative programming concepts. It seems to me that the relative
performance of monadic implementations must be equivalant to imperative
ones to provide a strong case for functional programming. For example, in
the Exception handling monad it seems that the "bind" function must be
called continously to pass the Error value back to an error handling
function. However, in imperative languages we can make an immediate
non-local transfer of control. Similiar is the way State is handled. Do
compilers for haskell do any sort of optimization on these monadic
operations or is it all as ineffecient as it looks.

        Eric Wohlstadter
        UCDavis Software Tools Lab