Indentation of If-Then-Else
Benjamin Franksen
benjamin.franksen at bessy.de
Sun Oct 22 13:16:57 EDT 2006
Henning Thielemann wrote:
> 1. 'if' syntax should be teached as
> if a
> then b
> else c
> This indentation makes pretty clear,
> what is condition, and what is the result in both cases.
> It just resembles
> case a of
> True -> b
> False -> c .
The problem with this is that in a do block it forces me to use /two/
indentation levels, instead of one, e.g.
> if test
> then do
> something
> more
> else do
> anotherthing
> stillmore
versus
> if test then do
> something
> more
> else do
> anotherthing
> stillmore
Ben
More information about the Haskell-prime
mailing list