Skip to content

Instantly share code, notes, and snippets.

@samsch
Last active January 24, 2017 17:21
Show Gist options
  • Save samsch/6038712759e3ef9cd779 to your computer and use it in GitHub Desktop.
Save samsch/6038712759e3ef9cd779 to your computer and use it in GitHub Desktop.
Should I use ES Next features?

Specifically, read this if you are considering turning on and using pre-stage 4 features with Babel.

What are these stages?

If an item is at stage 4, it's finalized and ready to be included in the next iteration of the Javascript standard. These should always be as safe to use as current standard features. Features at stage 4 were pulled for ES2015 and ES2016 around January/Febuary of that year. It's reasonable to expect the same for ES2017, ES2018, etc.

If it's at stage 3, it shouldn't change much or at all, but it's not final. Stage 2 and lower are up for changes as needed. You can read the full process here.

If something that is implemented in Babel (pre-stage 4) is changed, or removed, what happens?

It's effectively up to Babel and its community. Do they want to support something that will never be part of the language?

Ideally, most of the stage 2 stuff should make it to browsers eventually without major changes to the normal use cases; but it's not a guaranteed thing. So the decision comes down to the same thing as everything else. A trade-off whether using a new, potentially volatile feature will improve the dev experience enough to be worth the risk of it breaking. And it's important to remember that it's a developer experience point, not a application feature point; because if it can be compiled to older JS, then you don't need it in the first place to get where you are going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment