layout rule infelicity

Lennart Augustsson lennart@augustsson.net
Thu, 30 May 2002 07:52:58 -0400


Ashley Yakeley wrote:

> I am certainly not proposing Haskell be modified to eliminate the layout
> option. I'm just curious as to why Haskell programmers choose to use it.

Because I find programs using layout to be more readable.
In Haskell (not in C) programs using {;} I've found that the indentation is
often sloppy, and since layout is not enforced by the compiler I find it harder
to read.

I think it is largely a matter of taste.

Martin's point is well taken, though.  I think the redundancy can be useful
for beginners.  I suspect it's more the ; than the {} that makes it somewhat
easier for beginners.

    -- Lennart