Strict mode wasn't a breaking change; browsers that don't understand strict
mode simply ignore the no-op string.

There's lots of other threads on why no new modes are likely to ever be
introduced.

There's also no need to add pragmas or make breaking changes to make error
messages more useful; for that, I suggest filing specific suggestions on
each engine vendor's bug tracker.

On Sat, Jul 22, 2017 at 9:30 PM, Alexander Craggs <
alexan...@debenclipper.com> wrote:

> One of the main issues I've found with why a significant number of
> proposals are rejected is because it would introduce breaking changes into
> JavaScript, a language created over 22 years ago.  It doesn't surprise me
> that people have suggestions to improve JavaScript that are breaking,
> popular syntax seems to have changed significantly in those years.
>
> We *did* introduce some breaking changes though, using the "use strict"
> header at the top of files.  Would it not make sense to introduce new
> breaking changes under a similar header for each change we suggest?  For
> example, "use es7" could allow people to say they are using the latest
> features.
>
> Say we create such versioning, it would allow us to improve the language
> so much more than we're currently able to, we'd no longer have to stick
> with useless error messages for forgetting `async`:
>
> ```js
> < function u() { let x = await "hi" }
> > Uncaught SyntaxError: Unexpected string
> // Now...
> < "use es7";
> < function u() { let x = await "hi" }
> > Uncaught SomeError: "await" keyword used outside of async function
> ```
>
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to