On Tue, Apr 19, 2011 at 2:53 PM, Bob Nystrom <rnyst...@google.com> wrote:
> I think there are a large number of programmers who, because of those >> java style guidelines and the way ASI works, write javascript breaking >> before operators except for comma operators. >> >> http://www.google.com/codesearch?q=%5Cx20%5Cx20%5Cx20%5B%2B-%5D%5B >> ^%2B-%5D+lang%3Ajavascript >> shows numerous examples. >> >> If true, this is not just a matter of code backwards compatibility, >> but of porting programmers. >> > > That's unfortunate. There's another option: Python-style. In Python, I > believe newlines are ignored within a parenthesized expression. In JS, that > would mean: > > 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? -- John A. Tamplin Software Engineer (GWT), Google
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss