[Haskell-cafe] let vs. where

Donn Cave donn at drizzle.com
Tue Nov 13 16:08:55 EST 2007

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
> Reading the let vs where page I'm left with the strong impression that
> I should use let everywhere. I know that's not true, and in fact I
> much prefer where. Can we put a Wikipedia style "NPOV" (neutral point
> of view) tag on that page? Or can someone do some editing?

Maybe it would be enough to represent the example "where" problem more
fairly on its own terms.  The non-working example has us writing

  f = State $ \ x -> y
     where y = ... x ...

but the "where" side of the aisle is supposed to detest lambdas, so would
be unlikely to have taken this particular route anyway.

I'm not saying "ergo, there is no problem after all", only that it's not
all that well taken.

	Donn Cave, donn at drizzle.com

More information about the Haskell-Cafe mailing list