-
Notifications
You must be signed in to change notification settings - Fork 5
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
Real-world examples from Node.js #5
Comments
Any part of node that uses the "primordials" pattern pulls in, for example, With this proposal, it could name that |
I'd note that primordials in node do sometimes do much more than just uncurry the |
For future reference: nodejs/node#30697 and lib/internal/per_context/primordials.js. |
* explainer/spec: Rename to bind-this operator * explainer: Clarify property-accessor non-goal * explainer § Description: Reword, note Function.call equivalence * explainer § Description: Improve precedence table * explainer: Node.js real-world examples * explainer § Description: Fix inconsistent RHS See #7 (comment). Closes #5. Co-authored-by: Jordan Harband <ljharb@gmail.com> Co-authored-by: Bradley Farias <bradley.meck@gmail.com>
I am seeking real-world examples of code that would be improved by a syntactic
this
-bind operator.According to @ljharb and @bmeck, Node contains many methods that bind various intrinsic global methods in order to avoid being affected by external prototype pollution. @bmeck gives this example in tc39/proposal-extensions#11:
…which in this proposal would be improved to:
Where in Node.js (or elsewhere) does this pattern actually occur? We need to transplant examples from them into the explainer.
The text was updated successfully, but these errors were encountered: