Implementing classes using the new ES6 syntax (branch 5.0)#3070
Closed
leonardo-silva wants to merge 2 commits intoexpressjs:5.0from
Closed
Implementing classes using the new ES6 syntax (branch 5.0)#3070leonardo-silva wants to merge 2 commits intoexpressjs:5.0from
leonardo-silva wants to merge 2 commits intoexpressjs:5.0from
Conversation
|
Change for change's sake 👎 |
|
why only one class? change all and add babel config to transpile to work on old nodejs, otherwise it is useless |
Author
|
It seems that classes Route and Layer were removed in branch 5.0 |
Contributor
|
I'm 👎 and looks like a lot of the TSC and contributors are as well. At the very least, it causes failures on the currently-supported platforms and, as stated above, really just change for change :) To expand on that, we keep our source in ES5 to support the largest user base as is reasonable, being a core library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I created a new PR to change the branches (5.0 -> 5.0).
Initial PR: #3069
Original message:
Hi,
In my PhD research, I am using express in some experiments.
As a result, I detected the existence of at least 3 main "classes" in the current codebase (View, Route, Layer).
So, I decided to rewrite this code to follow the new syntax for classes provided by ECMAScript 2016, which I think is much more readable. All changes are just syntactical. I was also very careful to preserve the code style.
Finally, all tests are green in the migrated code.
Do you think it is worth to integrate these changes to the project?
Thank you