-
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: disambiguate with
statement's status
#2441
Conversation
The message must be very clear if this characteristic is going to be deprecated or not. One thing is for it to be discouraged and the other more traumatic for it to be deprecated. The specification should have a more formal definition of "deprecated " and "discouraged". Removing a feature is very painful on high impact. Also, if a characteristic that has been considered stable (for me if it has reached stage 3 or 4 of the process) is deprecated, the meaning of stable is lost, can this be clarified? What is stable and what is not? |
#2125 will be defining the term "legacy" for this purpose. However, applying the term "legacy" to a feature requires committee consensus, so this will have to be marked normative, not editorial. |
It seems like this might be better marked as "Legacy", once #2125 lands (which would require consensus) |
@michaelficarra i don't think it's normative just because it requires consensus. |
There are no substitutes for the Discouraging with reasons looks like a good way forward, but "deprecating" it makes little sense. I hope the |
deprecation (in a context where basically nothing can be removed) is the same as discouragement. |
3d0c24c
to
7a79833
Compare
Thanks for the comments here. I wasn't previously aware of #2125. "Legacy" seems like a great way to handle this sort of thing. When #2125 is merged, I'll be happy to update this PR to use the
I'm new to contributing to the specification and the contributing docs don't seem to cover a case like this. What, if anything, should I do make it easier for the committee to consider this for consensus? |
@ddbeck The typical process would be to find a champion, which is a representative of a TC39 member organisation who will present your topic to committee during one of the regular meetings. If you update the language here to use the term "legacy", as defined in #2125, I will present this topic as a needs-consensus PR for you at the next meeting. The case for |
7b39b7f
to
55ce3c3
Compare
@michaelficarra Excellent, thank you. I'd be delighted if you and the rest of the committee to take this up at the next meeting. I've updated the PR to use the term "legacy" and to set the legacy attribute for the clause (though this shouldn't really do anything until the other PR is merged). As soon as the other PR is merged, I'll rebase on top of that, too. Thank you again! |
55ce3c3
to
91a3c84
Compare
Since #2125 merged last week, I rebased my changes against the default branch and confirmed that this builds properly with the I'll be happy to make any additional changes requested, as this proposal works its way through the process. Thanks again! |
560948a
to
d53361d
Compare
We should put (Github isn't letting me comment directly on the PR for some reason.) |
@bakkot done |
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com> Co-authored-by: Michael Ficarra <mficarra@shapesecurity.com>
627420a
to
f125a96
Compare
Co-authored-by: Daniel D. Beck <daniel@ddbeck.com> Co-authored-by: Michael Ficarra <mficarra@shapesecurity.com>
Currently, the spec sends mixed signals to programmers about the
with
statement; this PR attempts to clear up the ambiguity by adding text that explicitly discourages the use of thewith
statement in new ECMAScript code.This is an attempt to solve a specific problem: developers and technical writers are unclear about the status of the
with
statement. See this StackOverflow question or this discussion in MDN Web Docs's browser-compat-data project to get a taste. This makes it difficult to document on MDN Web Docs and elsewhere.By forbidding
with
in strict mode code and cutting it off from many contemporary language features, the specification seems to imply that programmers shouldn't usewith
, but this is less explicit than other disfavored parts of the language (e.g., the note for thegetYear
method or the introduction to Annex B). Because there's no single way that the spec indicates non-preferred features, developers and technical writers have to make do with close readings and interpretations.Ideally, the specification could resolve the question definitively. This PR's fix to the problem is text that speaks directly to programmers, discouraging them from using the
with
statement. This is my attempt to put into words what I believe the existing text implies to programmers, but I'm open to making revisions which more accurately captures the posture towardwith
statement.Thanks for considering this change!