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

Re: [jslint] Re: option.es5

Expand Messages
  • Michael Lorton
    It makes reordering easier, editing the list less error-prone, and generating Javascript from data a little simpler. Overall, probably a good thing. M.
    Message 1 of 12 , Apr 7, 2010
    • 0 Attachment
      It makes reordering easier, editing the list less error-prone, and generating Javascript from data a little simpler. Overall, probably a good thing.

      M.




      ________________________________
      From: Simon Kenyon Shepard <simon.shepard@...>
      To: jslint_com@yahoogroups.com
      Sent: Wed, April 7, 2010 5:26:29 AM
      Subject: Re: [jslint] Re: option.es5

      So, would I be correct in surmising that this change from ES3 to ES5 to
      allow the trailing comma is for developer convenience as in the
      aforementioned reordering example?

      Out of curiosity are there any other reasons or examples where this would
      come in useful?



      On 6 April 2010 21:48, Michael Lorton <mlorton@...> wrote:

      >
      >
      > > 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@... <douglas%40crockford.com>>
      >
      > To: jslint_com@yahoogroups.com <jslint_com%40yahoogroups.com>
      > Sent: Tue, April 6, 2010 12:35:27 PM
      >
      > Subject: [jslint] Re: option.es5
      >
      > --- In jslint_com@yahoogroups.com <jslint_com%40yahoogroups.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]
      >
      >
      >



      --
      "We are the music makers, And we are the dreamers of dreams"


      [Non-text portions of this message have been removed]



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

      Yahoo! Groups Links



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.