-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Editorial: Rename predicate function parameter of Array methods #1782
base: main
Are you sure you want to change the base?
Conversation
A lot of these names make it into documentation; I am a little hesitant to change them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this change
I am highly concerned about the documentation and polyfill churn this change will cause. |
I've checked MDN: for Array methods, first function parameter is always a |
TypeScript's typedefs, for example, which I believe are used for integration in some editors (and which therefore surface these names to users of those editors). |
what happens if those names change or don't change? |
I’ve always considered the parameter names used in the spec to be implementation details (of the spec), similar to how the names of variables in spec algorithm steps are implementation details. Documentation can use any names whatsoever. |
I like it. My only concern would be on another spec having a normative reference to one of these names, such as by specifying a change/insertion of algorithm steps that refer to the name. But barring somebody providing an example of this dependency, I'm in favour of the change. |
b299fff
to
f5cb901
Compare
f5cb901
to
30e7b07
Compare
We might just change it in TypeScript because we like the change ourselves; but to have the |
3d0c24c
to
7a79833
Compare
This change makes naming more descriptive and consistent with
Array.prototype.find
andArray.prototype.findIndex
.b662dff is a follow-up of #1411.
See also #1786.