
"Simon Marlow"
Requiring a newline before a new layout context would break *a lot* of code. You can't write 'let x = 42 in x + 1' for example.
(I'm not sure this is a good example, as 'in' is (usually?) followed by a single expression. But one could write 'x + 1 where x = 42', and the point is still there.)
Sure, a refinement could be made to allow these kind of things,
Couldn't it, though? This looks very similar to Python's if x==y: foo x or, the alternative multi-statement case if x==y: foo x bar y AFAIK, there's no column-counting middle ground akin to if x==y: foo x bar y I think it would be a good idea to *allow* the current rules, but *recommend* that blocks (of more than one line) are made up by lines indented with whitespace, and whitespace only. Ideally, I'd like a compiler warning for this, but at least we should warn when multi-(or unknown-)column characters may affect indentation levels? -kzm -- If I haven't seen further, it is by standing in the footprints of giants