Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go full ES6 in v3.0? #1541

Closed
aearly opened this issue Jun 3, 2018 · 4 comments
Closed

Go full ES6 in v3.0? #1541

aearly opened this issue Jun 3, 2018 · 4 comments

Comments

@aearly
Copy link
Collaborator

aearly commented Jun 3, 2018

Currently, the only ES2015 feature we use is modules, which we compile away down to ES5 in the build process. As we are gearing up for another batch of breaking changes in the 3.0 release, we could also start using more ES6 features.

Node 4 just left its maintenance period, meaning we are left with Node 6, 8, and 10, which all have nearly full ES6 support. The situation for all major browsers is similar. https://kangax.github.io/compat-table/es6/

Pros:

  • Better developer ergonomics, smaller source code size
  • Lots of ES6 features (e.g. arrow functions, rest parameters) are faster than their ES5 equivalents
  • Can use Maps, Sets, Symbols, generators, Promises, etc. which are all handy

Cons:

  • Users still supporting ES5 environments, e.g. IE11 will have to transpile, which will slow down their builds. They can elect to keep using v2 however.
@hargasinski
Copy link
Collaborator

I think I would be in favour of using more ES6 features in the code base.

Since we dropped lodash and size isn't as much of a concern anymore, could we include an additional transpiled ES5 version, such as async/es5 or async/legacy, in the package for users that still need to support ES5 environments?

@GoNode5
Copy link

GoNode5 commented Jun 21, 2018

+1 full E6 only by default, it's time

@cekvenich
Copy link

No. ES5 until IE11 popularity drops.

@aearly
Copy link
Collaborator Author

aearly commented Jun 10, 2019

You're welcome to stick with v2, or transpile.

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

No branches or pull requests

5 participants
@aearly @GoNode5 @hargasinski @cekvenich and others