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

Normative: Remove the name prefix for wrapped functions #348

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

leobalter
Copy link
Member

We got the consensus reported in #338 (comment) with the following information:

  • length is set similarly to bound functions.
  • Copy the name from the target function, no prefix. Restricted to string-only values, similarly to bound functions.

This PR address the second bullet.

Although, some confusion came in from noted conclusion/resolution from the meeting in Dec 2021.

Where #339 still had the prefix and was merged as is.

I did not attend that meeting but did work on the slides and sync'ed with @rwaldron before it. I remember that we would request the consensus for the no-prefix option and it looks like what it was agreed upon reading the notes (not only the conclusion part).

RW: So here is the question of the day that we do need an answer about: How should wrapped functions use target function’s name and length. Note that this is definitely a normative change, in that it is a spec fix where there is no spec now. What we propose is that the length gets set similarly to bound functions and that the name is copied from the target function, but not with any prefix, and is restricted to string values only. This is similar to bound functions, but without a prefix. The pull request #338 has the change in it. Hopefully folks have had a chance to take a peek at that. If you haven't I would love it if you did.

RW: Can we get consensus on the way we’d like to solve this? Are there any questions the I can answer?

RPR: No one is on the queue at the moment.

  • normative change

RW: neat. So I'll ask for consensus

MAH: +1

YSV: Yeah, I support this also.

RW: Great. Thanks folks. Getting it done.

Thanks @caitp for pointing out we had the prefix in the main branch.


So I believe this PR is still a "has consensus" change, but it's alright if someone thinks it's good to present it again at the plenary.

cc @caitp @legendecas @syg @codehag @phoddie.

@leobalter leobalter requested a review from rwaldron January 31, 2022 19:31
leobalter added a commit to tc39/agendas that referenced this pull request Feb 3, 2022
Ref tc39/proposal-shadowrealm#348

In the TC39 Dec 2021 plenary we got consensus to set `name` and `length` for Wrapped Exotic functions within the ShadowRealms proposal. Even though, the meeting notes ended somehow ambiguous about the `name` property being prefixed with "wrapped " or not. The intention from the champions - as presented in that plenary - was to not use the prefix.
@rwaldron rwaldron merged commit 9b6f69a into main Feb 3, 2022
@ljharb ljharb deleted the leo/function-name-prefix branch February 3, 2022 16:00
ljharb pushed a commit to tc39/agendas that referenced this pull request Feb 3, 2022
Ref tc39/proposal-shadowrealm#348

In the TC39 Dec 2021 plenary we got consensus to set `name` and `length` for Wrapped Exotic functions within the ShadowRealms proposal. Even though, the meeting notes ended somehow ambiguous about the `name` property being prefixed with "wrapped " or not. The intention from the champions - as presented in that plenary - was to not use the prefix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants