Loading ...
Sorry, an error occurred while loading the content.

1266Re: [jslint] Re: option.es5

Expand Messages
  • Michael Lorton
    Apr 6, 2010
    • 0 Attachment
      > ES3 does not allow the trailing comma, so IE is correct when it rejects
      it.

      Distinguo: ES3 does not allow the trailing comma, so Internet Explorer is correct TO reject
      it.

      IE does the right thing the wrong way. It rejects the comma and gives an ambiguous message and the line number BUT NOT THE FILE NAME.

      Even assuming Microsoft employees should otherwise be allowed to live, this transgression (perversely maintained through every version of IE) is alone grounds for hunting them all down with dogs and shotguns.

      M.




      ________________________________
      From: Douglas Crockford <douglas@...>
      To: jslint_com@yahoogroups.com
      Sent: Tue, April 6, 2010 12:35:27 PM
      Subject: [jslint] Re: option.es5

      --- In jslint_com@yahoogroups.com, Rob Richardson <erobrich@...> wrote:
      >
      > I can see in certain circumstances that trailing commas could be deemed acceptable, though I'm still of the mindset that this is bad form in most JavaScript contexts. I'm failing to see how opting into this practice is linked to ES5 compatibility though. Does ES5 specifically dictate that trailing commas are acceptable?

      ES3 does not allow the trailing comma, so IE is correct when it rejects it.

      ES5 allows but does not require the trailing comma.

      There is often confusion between separators and terminators. Commas are separators. Semicolons are terminators.



      ------------------------------------

      Yahoo! Groups Links



      [Non-text portions of this message have been removed]
    • Show all 12 messages in this topic