[Haskell-cafe] Re: layout problem

Stefan Monnier monnier at iro.umontreal.ca
Wed Nov 16 21:16:44 EST 2005


>> Indeed!  I always use braces and semicolons with do-notation.  You are
>> free to do so too!  Nothing requires you to use layout. Indeed, you can
>> freely mix the two.

> I would not recommend braces and semicolons, because these allow a bad
> layout (easy to parse for a compiler, but hard to read for a human), unless
> you invest the time to make a tidy layout despite the braces and
> semicolons. (So why not only make a tidy layout?)

Unless you use a simplistic text editor, the braces and semi-colons allow
the text editor to do the layout for you.  While I find the layout notation
attractively clean, I find the redundancy of autolayout+braces+semicolons to
save me from a lot of trouble.


        Stefan



More information about the Haskell-Cafe mailing list