-
Notifications
You must be signed in to change notification settings - Fork 107
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
Stage 3 Criteria #442
Comments
👍 |
Some initial review:
|
Does this mean that a consensus has finally been reached ? |
No; after those delegates approve the proposal spec, the chamiopn can ask to the committee consensus to move the proposal to stage 3. |
Thanks for clearing that out. |
In a few days there will be a TC39 meeting and among the items on the agenda is the proposal to upgrade decorators to stage 3. Is there any progress on the part of the delegates about the proposal revision? |
I've reviewed the proposal both as a delegate and as an editor, though owing to the size the editorial review is more cursory than in-depth. Delegate reviewAs a delegate, V8 and Chrome's concern remains inclusion of the metadata stuff in this proposal. This isn't new feedback, and previously, when we've pushed back we've also gotten equal pushback from the champions that after talking with many stakeholders, the metadata use case is a crucial one for this proposal. Mechanically at least, the metadata stuff can be separated out. As for the importance of the use case for this proposal, I really do appreciate the amount of legwork the champion group has done here in identify uses. That said, with my implementer hat on, the amount of code we'd need to ship in engines to support it does not feel right. Too much code for something that still feels Would the champion group be open to splitting out the metadata parts? Smaller, more specific questions/comments:
Editorial reviewThe draft spec looks pretty good! When glancing over, nothing jumped out at me, and it even uses the latest style editorial conventions of ecma262, which is a really nice touch. |
The largest concern at the moment with splitting out metadata is that a large number of decorator use cases cannot be accomplished without it. For instance, one of the most common use cases across a variety of the most use decorator frameworks is dependency injection, and eager injection essentially requires metadata. The concern here is a pragmatic one. Decorators is in a unique space as a proposal, I would hazard to say that it is the most adopted pre-stage-3 proposal in the last several years, possibly ever. There are a lot of users and frameworks who will have to make a very tough choice if decorators ship in a partially-complete form which cannot solve basic use cases like DI (for reference, Inversify is just one decorator library whose sole purpose is DI, and it has 500k weekly downloads.) If decorators were to move to stage 4 without metadata, these users would have to choose between sticking with the current implementations and diverging from the language, or converting to a spec which cannot solve their basic use cases. The ramifications of this could be pretty severe. However, I understand that the proposal seems large as it is and it could be difficult to gain consensus on it in its entirety. I think there's room for a few possible solutions here:
One use case is setting up "observation hierarchies", e.g. destroying a value when its parent class is destroyed, registering the value on the parent class via the decorator.
This decision making process for this goes:
Given all of this, this was considered the best API overall. Thank you for the review, really appreciate it! 😄 |
The proposal has moved forward to stage 3, so this issue is no longer relevant. Metadata has been pulled out into a separate proposal, we'll continue the discussion on metadata there. |
The text was updated successfully, but these errors were encountered: