Hello,

I think that whole "program flow" thing is something you get used to.  In
true, pure functional programming (i.e. Haskell) "program flow" is a
meaningless term, basically.  Haskell is a declarative language, not an
imperative one.  You have to learn to give up that control and trust the
runtime to Do The Right Thing.  (In this regard it's similar to logic
programming languages.)


I think it's important/useful to point out that "program flow" in a pure
functional language is really a matter of data dependency. The compiler is
only free to arbitrarily order computations if there are no data
dependencies. Furthermore, monads are not special in any way (they are after
all just a useful set of combinators; e.g.
http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html);
they only wind up sequencing computations because they set up a data
dependency between the two arguments of the bind operator.

-Jeff
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to