> In the Haskell rules as I understand them, semicolon auto-insertion is tied > to curly brace insertion. If a programmer hand-inserts the curly brace, they > are necessarily taking responsibility for the semicolons.
Yes. > But automatic semicolon insertion could be done even when the curly brace has > been inserted by hand. It simplifies the layout state machine a bit if this > is done. Is there a reason not to do so? It sounds like you're thinking about this from an implementor's perspective. But think about it from a programmer's perspective. Why would you want to have semicolons inserted automatically in code that has explicit curly braces around it? An opening brace is a programmer's way of saying "I don't want to be constrained in how I lay out this code", "I don't want to have to think about layout", "I object to the idea that whitespace has significance", or "This code was generated by a program that doesn't know about Haskell's layout rule". Auto-inserting semicolons in cases like these would defeat the purpose of having explicit braces. Personally, I'd be happy if implicit layout was the only option (no explicit braces)---I never have any of the concerns mentioned above. This would also simplify your state machine :-) However, not everyone in the Haskell community shares my enthusiasm for layout. All the best, Mark _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
