Proposal: Modify automatic semicolon insertion in strict mode

Brendan Eich brendan at
Sun Dec 7 23:09:18 PST 2008

On Dec 7, 2008, at 9:48 PM, David-Sarah Hopwood wrote:

> Yuh-Ruey Chen wrote:
>> Most people on this list consider automatic semicolon insertion
>> something of a mistake. However, I think this feature would be fine  
>> if
>> it were not so "eager" and thus causing all sorts of subtle errors  
>> and
>> hampering language evolution (e.g. the ongoing lambda discussion). By
>> eager, I mean that there are too many cases where automatic semicolon
>> insertion takes place.
> There are, but I think it's a bad idea to change semicolon insertion
> in such a way that currently valid programs are still valid but are
> parsed differently.

Indeed, this is a non-starter. No browser-based implementation can  
take the chance of breaking content by doing this. Opt-in versioning?  
That just complicates things for implementors and users of the language.

I think it is a waste of time to fuss about ASI in the belief that  
doing so will make novel syntax easier to add. It surely could, but  
changing the meaning of extant programs (or such programs under a new  
explicit version selection) is not going to happen. And we should be  
skeptical of syntactic innovation that wants it to.

We should keep syntax from growing as randomly as it has in Ruby,  
frankly. If ASI helps, great. I earlier plugged eclecticism but that  
was to kick off the {|...| ...} lambda syntax bikeshed-thread. We've  
reached some conclusions thanks to that thread. Borrowed syntax now  
seems strictly less desirable than it did before that discussion.


More information about the Es-discuss mailing list