Make comma at the end of line optional

Allen Wirfs-Brock allen at
Tue Sep 12 18:35:37 UTC 2017

> On Sep 12, 2017, at 11:22 AM, dante federici <c.dante.federici at> wrote:
> The one thing I still have a gripe over is the class definition syntax -- where neither `,` or `;` are used at the end of method expressions.

Look at the grammar.

`;` is not part of the concise method production, but it is still perfectly fine to insert a a `;` at the immediate end of a concise method.  This is exactly like function declarations.  A ‘;` is not a required part of a function declaration, but you can put one there if you want.

function f() {};

class C {
   m() {};
   n() {};
}  //you can put a ;  here, too if you want

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list