[Haskell-cafe] Re: let vs. where
Christian.Maeder at dfki.de
Wed Nov 14 03:31:33 EST 2007
John Lato wrote:
> 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 prefer the expression style. And I also like to order my definitions
in a file "bottom-up" (basics first).
But it may be more didactic to do it all "top-down".
Imports should be placed at the bottom of the file then, too.
My cent, Christian
More information about the Haskell-Cafe