[Haskell-cafe] let vs. where
nominolo at googlemail.com
Tue Nov 13 16:26:56 EST 2007
On Tue, 2007-11-13 at 13:08 -0800, Donn Cave wrote:
> On Tue, 13 Nov 2007, Neil Mitchell wrote:
> >> This depends on whether you are an "expression style" or "declaration
> >> style" programmer.
> >> http://www.haskell.org/haskellwiki/Declaration_vs._expression_style
> >> http://www.haskell.org/haskellwiki/Let_vs._Where
"Monadification" is a refactoring. You want IDE support for this
anyways, so I don't think one should prefer let over where solely for
the purpose that one day you might do this transformation. I personally
prefer where clauses, since code becomes very readable if you name your
However, if you refer to variables bound inside monadic code, you simply
have to use 'let'.
More information about the Haskell-Cafe