On Wed, Jul 15, 2009 at 1:42 PM, Noah Evans <[email protected]> wrote:

> http://9fans.net/archive/2008/05/6


Haskell *will* tell you errors that don't make any sense (at least GHC
errors) when you don't have things like this done properly

do x <- foo
y <- bar

the y <- bar must be directly under the x on the previous line or it's a
syntax error, and the error you get from GHC is "the last statement of a do
construct must be an expression"

not

"dude, you suck at indenting code, and should have used Emacs to keep track
of it, because nothing else does the job right".

Luckilly Haskell will let you ignore "layout" and do the following:

do { x <- foo
; y <- bar }

However, I don't see enough of this style code to feel comfortable writing
anything I'd plan to share with anyone and expect them to feel ok reading
it.

Dave


> <http://9fans.net/archive/2008/05/6>
>
> On Wed, Jul 15, 2009 at 10:29 PM, Jason Catena<[email protected]>
> wrote:
> > Devon's anecdote is along the lines of my position.  I'm sure there's
> > a paper somewhere that counts parenthesis versus whitespace errors,
> > but I haven't yet read it.  I have programmed Lisp and Haskell (at two
> > extremes), and from this experience at least much prefer whitespace to
> > parentheses.  In addition, I rely on design theory (esp. Tufte et al
> > on his web site) that reducing clutter aids comprehension, and
> > delimiters very much seem clutter to me.
> >
> > Jason Catena
> >
> >
>
>

Reply via email to