Ross Paterson <[EMAIL PROTECTED]> wrote:

> The semicolon before the "else" is the most useful.  Adding another
> before the "then" has less motivation.

   do if foo
      then bar
      else baz

seems just as likely to occur as

   do if foo then bar
      else baz

particularly if the condition "foo" is large, and/or indentation is
already running a long distance to the right.

> > However, I have never come across the case-of expression variation
> > in practice.  Indeed, the wiki page is not very clear on what
> > exactly the problem is.
> 
> The argument regarding "case" is that if you add a semicolon before
> "then", it would be consistent to also add one before "of".

If the only argument is consistency, then surely the same applies to the
"in" in a let expression.  But of course this would correct a problem
that never occurs in practice, because in a do-block one uses plain let,
not let-in.  So what evidence is there that case-of is a problem in
practice?

Regards,
    Malcolm
_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to