I wasn't as accurate as I should have been in my post.
You're right in that main crosses the border of your program. do blocks are just syntactic sugar for effectfull monads.
However, if you're using monads as effects you are essentially doing imperative programming. A single, isolated, effectfull monad, such as Maybe used as the result division by 0, I would not consider imperative yet, but large do blocks full of them I would definitely consider part of the functional border.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
the boundary in haskell is
main
, notdo
, although that has as much to do with laziness as fp.I wasn't as accurate as I should have been in my post.
You're right in that
main
crosses the border of your program.do
blocks are just syntactic sugar for effectfull monads.However, if you're using monads as effects you are essentially doing imperative programming. A single, isolated, effectfull monad, such as
Maybe
used as the result division by 0, I would not consider imperative yet, but largedo
blocks full of them I would definitely consider part of the functional border.