Replies: 0 comments 30 replies
-
I think the word that best fits with what we’re wanting to convey is “discouraged”. “discouraged” is good because it lacks the baggage and formal connotations of “deprecated“ and of “obsolete” too. There are cases when specs have need to normatively assert formal status of a feature — and that spec need is met by “deprecated“ and of “obsolete”. But for MDN, we have no need to normatively (re)assert formal status of anything. Instead, we only have need to convey a less formal assessment of whether particular features are “not generally recommended” or “known not to be a best practice”. So “discouraged” is a good concise word to convey “not generally recommended” or “known not to be a best practice”. As far as relevant discussion elsewhere: TC39, for stuff that’s part of the language but that’s generally discouraged — in particular, much of the stuff in Annex B of the ES spec — has been internally using the word “icky”…
I think we have evidence it’s confusing to some readers, and that other readers object to some cases where we’re using it. But I think “discouraged” would at least not be as confusing, and at least not as objectionable. To help put it in terms of what developers are already familiar with: I think most developers understand what “code smell” means — and if they aren’t familiar with that term already, they get the interference — and I’m reminded of the Zappa quote about “Jazz isn't dead. It just smells funny”. What we need for MDN is something to flag cases of “This feature may not be dead yet, and may not be formally recognized as even being on its way to becoming dead, and in fact may never die — but… it’s kinda icky and it kinda smells funny”.
I believe we have a clear need to continue flagging the stuff we currently have flagged as deprecated — but I think we just need to come up with a better word for conveying it to developers. And short of going all the way to “icky” or ”smells funny”, I think “discouraged” conveys well what we actually are wanting to convey. |
Beta Was this translation helpful? Give feedback.
-
mdn/content#4866 relates to another grey-area feature: The DOM spec doesn’t mark it as deprecated — all that is does say is a comment in the IDL: boolean isSameNode(Node? otherNode); // legacy alias of === The implication of “legacy alias of ===” is “You shouldn’t use |
Beta Was this translation helpful? Give feedback.
-
For the record here: For the ES spec, TC39 adopted and documented the use of the special word/flag Legacy — for flagging cases in the spec of features that they want to warn developers away from. https://tc39.es/ecma262/multipage/conformance.html#sec-conformance
|
Beta Was this translation helpful? Give feedback.
-
When a language discussion gets nowhere, I think it's helpful to look again at the thing it's trying to describe. Having written Chrome's own deprecations and removals column for the last six years, I think I can make a few generalizations. First, as a web developer, I don't care about a spec deprecation until a browser implements it. I don't know what other browsers do, but when Chrome implements a deprecation, we either build its replacement first, or we look closely at how much something is used in the wild. So the sequence in Chrome looks like this: Spec deprecation > [Replacement implementation] > Chrome deprecation(includes console warning) > Chrome removal Question: can't we just solve this with adjectives? "Spec deprecation" "Browser deprecation". |
Beta Was this translation helpful? Give feedback.
-
I wish we could. MDN uses deprecated to indicate things that might be neither, as per the discussion further up: https://github.com/mdn/content/discussions/5549#discussioncomment-837662 |
Beta Was this translation helpful? Give feedback.
-
I can live with 'legacy' for TC39 features because it's in the spec. I object to cases where it's not in the source. For example, Chrome uses the word 'deprecated' to refer to features slated for removal at a later date. To not mirror that term in BCD or on MDN is to introduce a possible source of developer confusion. I can imagine someone asking what's the difference between a Chrome deprecated feature and a Chrome legacy feature and, not knowing it's MDN's term, searching in vain for an explanation on a Google site. |
Beta Was this translation helpful? Give feedback.
-
@ddbeck Your PR for removing HTML Imports reminded me of this discussion. I understand removing this content due to lack of current and future support, but also am wondering if there is a need to document this content as having been a thing for the historical record? I would imagine it would have all the necessary surrounding content to warn about support. |
Beta Was this translation helpful? Give feedback.
-
The two questions that most pop up associated with deprecated are:
It would be good if whatever we do here could answer either or both questions. The word "discouraged" does not answer these questions - it just tells you that you shouldn't be using it in an even less precise way. Just an idea - maybe we could do some of this this with options to the deprecated header, allowing the generated content to be changed to incorporate a precise definition of the term. So for
What I like this idea is that:
Another similar idea is that you can specify a clarification to deprecated, but it must always be a spec definition. So below "legacy" is the word used to describe the API in the spec (would love an url to spec too, but let's keep this simple):
Most recently this came up today in Issue with "CSP: block-all-mixed-content": Deprecated without explanation or suggested replacement. #9889 (answered) |
Beta Was this translation helpful? Give feedback.
-
AFA terminology, there are not a lot of replacement choices for "deprecated" that can be easily understood. While on the subject of "deprecated", I would also like to mention the following ...
|
Beta Was this translation helpful? Give feedback.
-
Last week, I had a lengthy conversation with @wbamberg, @Elchi3, @sideshowbarker, and others on some trouble with using the term "deprecated" on MDN and in BCD. I'm mostly writing this down to get it out of my head, but if there are others who are interested in this discussion, please point them to this discussion.
The questions that came out of that conversation came out to three parts:
I've got some additional background for each of these questions in the sections that follow.
What do we intend for "deprecated" to mean on MDN?
Since BCD drives a lot of the deprecated text on MDN (e.g., the tooltips on deprecation in compat tables), BCD's definition of deprecated happened to spur this whole discussion.
An interesting question here is: does BCD agree with other practices (e.g., adding deprecation banners) on MDN? As an author, do you typically use "deprecated" to mean anything else?
Is our use of "deprecated" understood by readers in the same way we intend it?
In mdn/browser-compat-data#10490, a contributor mentioned this Stack Overflow question: Is the JavaScript keyword
with
really deprecated?. The discussion there highlights some of the conflict: TC39 uses "deprecated" one way, MDN another, an argument ensues. I don't know if we have other (good) ways to find out what readers think "deprecated" means.To get a sense of the broader use of "deprecated", I asked in the Write the Docs Slack about how other tech writers are using "deprecated" (see my full notes for a complete breakdown of the discussion). The biggest takeaway there is that other authors often use "deprecated" to mean that something is on the road to removal, even if it never arrives at that destination. My conclusion is that MDN is doing something slightly unorthodox, but I'm curious if there are other perspectives on this.
Should we continue to use "deprecated" as we've been doing or consider adopting alternatives?
The Write the Docs discussion highlighted a key thing, which is probably of interest regardless of how we use "deprecated": when something is discouraged from use we ought to direct users to alternatives.
Apart from that, there are probably other words we could use in place of deprecated, if we think we're using deprecated wrongly. We'd need to come up with some alternatives and have a definition to go with it.
Related issues
https://github.com/mdn/yari/discussions/2905 - discusses using front matter to set deprecation banners
Beta Was this translation helpful? Give feedback.
All reactions