> That's not really fair, Peter.  It's not _required_ to use layout in
> Haskell, since indentation is just sugar for the brace-and-semicolon
> syntax. For example, instead of
>
>     let f x = x + 3
>         g x = x * 4
>     in f . g                  -- . is function composition
>
> you can write
>
>    let { f x = x + 3; g x = x * 4 } in f . g
>
> Then you're free to rearrange the whitespace however you want.  However,
> people usually use layout because it reads very nicely, and it's not
> hard as Peter makes it sound.  There are enough other interesting things
> in Haskell to make it worthwhile to learn, and some people really like
> the syntax.  Haskell and Ruby are very different languages, but they both
> seem designed with thought to elegance and best practices.
>
> Just the same, I would not like to see layout in Ruby.

Me neither. I only criticized the layout feature of Haskell, and I like to
exagerate :-) I'm surely not telling people not to learn Haskell; actually
I think they should.

But the problem with indentation is that if I changed the first line of a
statement, it's possible that I need to adjust all the indentation of the
following lines of the statement. If I make another change, I might have
to change it again. If I'm not happy with the addition I just made, I need
to change it back, etc. And I normally have my editor use spaces instead
of tabs, but if you work with someone else on some Haskell code and he
does use tabs, it can give you long hours of sweating over that compiler
error.

To me, layout sounds good in theory, but less good in practice in the
sense that it's actually more an extra worry than a gain. But you are
right, if it hurts somewhere, don't go there! One quickly learns that. But
Haskell is not the bad place, the layout is. To me at least.

So for all clarity: Haskell rules, Ruby rules supreme!

Peter