> > var a = 1 >> + 2 >> // a = 1 >> >> var a = (1 >> + 2) >> // a = 3 >> > > Ok, so you are advocating that adding extra parens is less typing and less > prone to error than adding semicolons? >
Yes, adding extra parens where needed and omitting ";" is less typing. To verify, I just went through a bunch of JS that strictly follows Google's style guide (which means lots of long names and a maximum of 80 chars wide, so plenty of line continuations). My results: - Lines of code: 1,312 - ";", which could all be omitted: 388 - Places where "()" would need to be added to preserve current behavior: 0 So 388 fewer characters to type. I'm not sure what you mean by "less prone to error". Relative to mandatory semicolons or current ASI semantics? - bob
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

