> Assume we are in an item sequence where the opening brace was explicit. Under 
> these conditions, there are only three ways that a semicolon can get 
> automatically inserted:

Before we go further, I want to make sure I understand the context
for this comment.  In Haskell, there is no way for a semicolon to
be inserted automatically in a section that begins with an
explicit open brace (unless it is part of an inner construct that
is using implicit layout).  So, in your comment above, were you
thinking of Haskell, or proposing a new approach for BitC?

> So what I think I'm saying here is that well-formed code should never trip on 
> semicolon auto-insertion, and ill-formed code is something we want to 
> diagnose in any case. All that's necessary to avoid ';' insertion is to keep 
> the code marginally readable by lining up starts of lines. Programmers with 
> neurons do that anyway. I don't feel greatly constrained to support the other 
> kind. :-)

Incidentally, fans of explicit layout in Haskell often opt for
code that looks something like this:

     do { x1 <- expr1
        ; x2 <- expr2
        ; x3 <- expr3
        ; expr4
        }

You might also want to know that lining up starts of lines within
an implicit layout block is precisely what triggers insertion of
semicolons in Haskell (i.e., precisely the opposite of what you
said above).  That's why the code above can be written as follows
using implicit layout:

     do x1 <- expr1
        x2 <- expr2
        x3 <- expr3
        expr4

All the best,
Mark


_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to