Rationalizing ASI (was: simple shorter function syntax)

Maciej Stachowiak mjs at apple.com
Sun Jul 25 16:59:57 PDT 2010


On Jul 25, 2010, at 11:36 AM, Brendan Eich wrote:

> 
> Let's not go in circles. I claim:
> 
> * The horses are long gone from the barn.
> * The mistake is easy to overlook even for JS coders who do use semicolons.
> * The trade-off of banning ASI rule 1 first bullet to reduce desensitization and eventually reduce the incidence of this kind of bug is not a clear win, vs. migration tax into Harmony and usability problems even writing fresh code.
> 
> In order to reliably remove this hazard, we would need to ban statements from starting with '('. Perhaps we should consider doing so.

Banning statements from starting with '(' would remove one of the easiest workarounds for the rules against statements starting with 'function' or statements starting with '{'.

Regards,
Maciej




More information about the es-discuss mailing list