On Apr 19, 2011, at 8:39 AM, Isaac Schlueter wrote:

> This style is more easily
> scanned.  The important tokens are along the left edge, which forms a
> straight line with logical and orderly breaks, and those tokens are
> not overused, so their presence or absence is very noticeable.  The
> right-edge is jagged, and when every line has a ";", the brain tends
> to filter out their presence, making it hard to notice their absence.

This is accurate in my experience. Even experienced semicolon users sometimes 
leave a few out, and the lack is hard to see.


>> Restricted productions are the most benign cases. How ASI changes
>> program behavior WRT unrestricted productions is bigger problem.
> 
> Can you provide examples of the sort of unrestricted productions
> you're referring to, where unexpected "semicolon insertion" changes
> program behavior?  In my experience, it is the *lack* of ASI that
> usually causes problems with unrestricted productions.

Must be what Garrett means, since ASI is *only* error correction, plus of 
course built-into-the-grammar restricted productions.

So ASI does *not* change program behavior from non-error behavior A to 
non-error behavior B. It instead suppresses early SyntaxError with successful 
evaluation, in a deterministic way.

So any statement of the form "... ASI changes program behavior WRT unrestricted 
productions is bigger problem" is simply misstated.

Again, it is the expectation of newline significance where none exists, where 
no error is corrected by ASI, that leads people astray. This is worth working 
to fix, or mitigate, provided migration works well.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to