Re: [Haskell-cafe] if-then without -else?

9 Jul
2018
9 Jul
'18
8:14 p.m.
* Why require that each "if-then" has an "else"*
Never mind the semantics, this is a piece of syntactic history. ALGOL 60 allowed omitted "else". That gave ambiguity: if p then if q then ... ... else ... There was no layout rule. Does the "else" match to the outer "if-then" or the inner? BCPL ~1965 had two constructs if p then test q then ... ... else ... "if-then" has no "else". If you want an "else" use "test-then-else". AntC
2506
Age (days ago)
2506
Last active (days ago)
0 comments
1 participants
participants (1)
-
Anthony Clayden