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

Rename nextTick #4189

Closed
pspi opened this issue Dec 8, 2015 · 5 comments
Closed

Rename nextTick #4189

pspi opened this issue Dec 8, 2015 · 5 comments
Labels
feature request Issues that request new features to be added to Node.js. process Issues and PRs related to the process subsystem.

Comments

@pspi
Copy link

pspi commented Dec 8, 2015

The nextTick function doesn't do what the name states, as it is more of like "current tick", or "from C++ into JS land". How about renaming it to something better?

@mscdex mscdex added feature request Issues that request new features to be added to Node.js. process Issues and PRs related to the process subsystem. labels Dec 8, 2015
@bnoordhuis
Copy link
Member

Flat out renaming it would break a lot of existing code so that's a no-go. Aliasing it is a possibility but that seems fairly pointless to me.

@jwueller
Copy link
Contributor

jwueller commented Dec 8, 2015

I do not think adding an alias would improve things. This has been part of the API for quite a while and would probably not get hard-deprecated for an equally long time as a result of that. People are already confused about the differences between setImmediate(fn), setTimeout(fn, 0) and process.nextTick(fn). If hard-deprecation is unlikely, an alias is only going to add to this confusion.

@rvagg
Copy link
Member

rvagg commented Dec 8, 2015

I think we can confidently say that there's it's not going to be renamed. It was an accident of history that's baked (like, in a very hot kiln for a very long time) in to Node for all time. Documentation and education are the means we've been using to correct the mistake and that's all we can rely on. I agree with @jwueller that an alias isn't going to improve the situation and will just make the API more messy.

@rvagg rvagg closed this as completed Dec 8, 2015
@pspi
Copy link
Author

pspi commented Dec 10, 2015

I was under the impression that following semver allows us to easily do breaking changes. I'd vote for fixing the past mistake now.

@bnoordhuis
Copy link
Member

Semver lets us advertise breaking changes, that's true. It doesn't mean we're fond of introducing changes that break half of the ecosystem.

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. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

No branches or pull requests

5 participants