[Haskell-cafe] let vs. where

Sebastian Sylvan sebastian.sylvan at gmail.com
Tue Nov 13 14:16:01 EST 2007


On Nov 13, 2007 6:56 PM, John Lato <jwlato at gmail.com> wrote:
> Hello,
>
> I know there are several important differences between let-expressions
> and where-clauses regarding scoping and the restriction of "where" to
> a top-level definition.  However, frequently I write code in which
> either one would be allowed, and I was wondering if there were any
> guidelines or preferences for one structure over the other.  Currently
> my choice is guided by aesthetics more than anything else ( I prefer
> the look and ordering of a where clause).  Is there anything else I
> should consider?  What do veteran Haskell programmers prefer?


I use let in monadic code and in lambda expressions, and where clauses
everywhere else, pretty much. It's pretty much entirely based on what
I think "looks" nice.




-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862


More information about the Haskell-Cafe mailing list