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

doc: don't use "interface" as a variable name #4900

Closed
wants to merge 1 commit into from

Conversation

ChALkeR
Copy link
Member

@ChALkeR ChALkeR commented Jan 27, 2016

In readline.markdown, don't use strict mode reserved keyword interface as a variable name.

This commit changes the name of one readline.Interface instance from interface to rl, as it is named in other places of the readline documentation.

@ChALkeR ChALkeR added doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module. labels Jan 27, 2016
@ChALkeR
Copy link
Member Author

ChALkeR commented Jan 27, 2016

Note that some modules obviously copy-pasted it from there.

For example:

2388    ewdjs-0.103.0.tgz/essentials/install.js:284:  interface.question("Enter Y/N: ", function(answer) {
2388    ewdjs-0.103.0.tgz/essentials/install.js:276:interface.question('Install EWD.js to directory path (' + process.cwd() + '): ', function(installPath) {
31      typenode-0.1.1.tgz/example/readline.ts:41:  interface.question('What is your favorite food?', function(answer) {
26      gtm-0.1.0-56-g1b5486c.tgz/tests/readline_gtm.js:14:interface.question(" Welcome to the GT.M prompt via Node.js ", function(answer) {

In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.
@vkurchatkin
Copy link
Contributor

Note that some modules obviously copy-pasted it from there.

I see no problems with that. Not all modules are stict-mode compatible

@ChALkeR
Copy link
Member Author

ChALkeR commented Jan 27, 2016

@vkurchatkin But they would be forced to take some extra steps when migrating their sources to strict mode. Also, this means that people copy-paste that, and the users of strict mode already took some extra steps after copy-pasting the example code.

@vkurchatkin
Copy link
Contributor

@ChALkeR I mean, changing this in the docs is a good idea, but it's not a big deal that some modules have this. Some people deliberately write incompatible code

@cjihrig
Copy link
Contributor

cjihrig commented Jan 27, 2016

LGTM

@jasnell
Copy link
Member

jasnell commented Jan 27, 2016

LGTM

1 similar comment
@JungMinu
Copy link
Member

LGTM

@silverwind
Copy link
Contributor

Thanks! Landed in 6894c62.

silverwind pushed a commit that referenced this pull request Jan 29, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: #4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
@silverwind silverwind closed this Jan 29, 2016
rvagg pushed a commit that referenced this pull request Feb 8, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: #4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: #4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: #4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: #4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
In readline.markdown, don't use strict mode reserved keyword "interface"
as a variable name.

This commit changes the name of one `readline.Interface` instance from
"interface" to "rl", as it is named in other places of the doc.

PR-URL: nodejs#4900
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants