On Wed, 12 Mar 2008, Donn Cave wrote:
On Mar 12, 2008, at 12:32 PM, Brandon S. Allbery KF8NH wrote:
On Mar 12, 2008, at 14:17 , Donn Cave wrote:
Sure. It isn't a lot of code, so I subjected it to Either-ization
as an experiment, and I did indeed take the monad procedural route.
Monad != procedural, unless you insist on do notation. Think of it as
composition (it may be easier to use (=<<) which "points the same
direction" as (.)).
Yes, I insist on do notation, because it provides a convenient
binding form that works with what I'm doing - the original functional
variation wasn't so suited to composition either, and used `let'.
But I see that as only syntactic - equally procedural, either way.
Expressions are evaluated in a fixed order,
Do notation only looks like there are statements that are processed from
the beginning to the end. But that's not true, it's still purely lazy and
expressions are evaluated in the order that is forced by data
dependencies.
I have added this issue to
http://haskell.org/haskellwiki/Do_notation_considered_harmful
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe