FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib: scope loop variables by Trott · Pull Request #4965 · nodejs/node · GitHub

/ node Public

lib: scope loop variables - #4965

Closed
Trott wants to merge 2 commits into
nodejs:masterfrom
Trott:lib-no-redeclare
Closed

lib: scope loop variables#4965
Trott wants to merge 2 commits into
nodejs:masterfrom
Trott:lib-no-redeclare

Conversation

Trott commented Jan 30, 2016

Copy link
Copy Markdown
Member

Refactor instances in lib where a loop variable is redeclared in the
same scope with var. In these cases, let can be used to scope the
variable declarations more precisely.

Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.
Trott added lts-watch-v4.x lib / src Issues and PRs related to general changes in the lib or src directory. labels Jan 30, 2016

mscdex commented Jan 30, 2016

Copy link
Copy Markdown
Contributor

IMHO with regard to these variable definition changes, I think we should either avoid or at least be careful with using let in hot code/paths since v8 apparently still imposes a significant performance penalty when using let. const however does not seem to cause any performance regressions.

Trott commented Jan 30, 2016

Copy link
Copy Markdown
Member Author

@mscdex I've changed this to avoid the whole "Is let performant yet?" question. PTAL

mscdex commented Jan 30, 2016

Copy link
Copy Markdown
Contributor

LGTM

Trott commented Feb 1, 2016

Copy link
Copy Markdown
Member Author

jasnell commented Feb 1, 2016

Copy link
Copy Markdown
Member

LGTM

jasnell pushed a commit that referenced this pull request Feb 1, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: #4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>

jasnell commented Feb 1, 2016

Copy link
Copy Markdown
Member

Landed in 089d84f

jasnell closed this Feb 1, 2016
rvagg pushed a commit that referenced this pull request Feb 8, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: #4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 17, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: #4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: #4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins mentioned this pull request Feb 18, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: #4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Refactor instances in `lib` where a loop variable is redeclared in the
same scope with `var`. In these cases, `let` can be used to scope the
variable declarations more precisely.

PR-URL: nodejs#4965
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Trott deleted the lib-no-redeclare branch January 13, 2022 22:32
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

Labels

lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL