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

FR: Rewrite libs in ES201{5/6} #3371

Closed
hemanth opened this issue Oct 14, 2015 · 6 comments
Closed

FR: Rewrite libs in ES201{5/6} #3371

hemanth opened this issue Oct 14, 2015 · 6 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@hemanth
Copy link
Contributor

hemanth commented Oct 14, 2015

It would nice to have lib in ES201{5/6} now that we support few features, did not const being used widely, we could bring in others as well?

@mscdex mscdex added the feature request Issues that request new features to be added to Node.js. label Oct 14, 2015
@bnoordhuis
Copy link
Member

Do you concrete proposals? Please note that some ES6 features have performance issues that currently make them unsuitable for use in core.

@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

In general, newer ES6 features will eventually begin to creep into lib more and more but only when we're sure they're being optimized by V8 and we're sure they actually make sense. For instance, we do make extensive use of const and we're starting to see more use of template strings. However, things like Promise support in the API isn't likely to happen for a very very long time if at all. As @bnoordhuis suggests, it's better (more effective) to come up with proposals for very specific changes where use of the newer ES features would provide a definitive benefit.

@mikeal
Copy link
Contributor

mikeal commented Oct 14, 2015

Perhaps we should add an "ES6" section to the contribution guidelines that details which features are acceptable to use in core (basically the ones that have been optimized).

@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

that would be helpful... but I would be careful about classifying them as "acceptable". It should be positioned as a best practice based on (1) what is optimized and (2) what is in the best interests of the ecosystem

@rvagg
Copy link
Member

rvagg commented Oct 15, 2015

Going to close this because:

  1. There are performance concerns with many of the new features so they are only being embraced insofar as they can match (or beat, hah!) the performance we have without them
  2. The general consensus in core is that pull requests should not create unnecessary churn—this particularly helps when tracking down the cause of a bug because you don't get continually hung up on commits that don't make a difference. This policy for instance means that we are currently in a state of having mixed const and var usage although many collaborators are preferring the former, nobody really wants to see a commit that does a bulk replacement.

@rvagg rvagg closed this as completed Oct 15, 2015
@hemanth
Copy link
Contributor Author

hemanth commented Oct 15, 2015

Perhaps we should add an "ES6" section to the contribution guidelines

👍 An ES6 specific experimental branch would be useful?

performance concerns

🌵 Yes, I have seen few cases where the polyfill is faster! [Agree polyfill doesn't take care of all the edge cases, but some of those edge cases are for the 1% ]

nobody really wants to see a commit that does a bulk replacement.

Agree, it could be a slow progression, at least with those with no perf issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests

6 participants