-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
How to understand the word "taint" in the new APIs taintObjectReference and taintUniqueValue? #6343
Comments
I'd look at how tain checking or related concepts in Computer Science are translated. Does that help? |
@eps1lon Thanks for you response. |
The word Dirty is used to set a tag, which marks the state needs update, so it can be updated in future updates, and enables unnecessary updates to be skipped. So is taint a tag similar to It seems to be used to mark the object with special behavior, such as in the |
The point is that why does React use |
|
It seems like "Taint checking" already has its own Chinese terminologies for us to use according to wiki: https://zh.wikipedia.org/wiki/%E6%B1%A1%E7%82%B9%E6%A3%80%E9%AA%8C |
@Yucohny in fact, it IS used for marking something negative (potentially hurting security) and that is the motivation for introducing these APIs |
Hi @lunaleaps, it's been a while ;) According to the docs and tweets from Seb's and Matt's (e.g. https://x.com/mattcarrollcode/status/1716599758025093546?s=20), the taint API was introduced for security and privacy reasons, notably accessing data in undesirable context. The uses of the term "taint" in React, as well as Computer Science in general (e.g. "taint checking"), are both connotated with its very literal meaning in English: "a trace of bad or undesirable quality or substance", not to mention that it already has a canonical translation in the Chinese programming community: https://zh.wikipedia.org/wiki/%E6%B1%A1%E7%82%B9%E6%A3%80%E9%AA%8C So I strongly suggest that we should emphasize the intended difference and separate it with much more neutral and generalized words like "mark" or "label". |
Sure, that sounds fine to me. I think this is the call of the translator at this point. I do stand by using the terms "label" or "mark" to conceptually explain what taint-checking means here. But for the naming of the actual feature, a more distinguished term makes sense to me! Also hi @Huxpro!! |
When I'm translating the docs
reference/react/experimental_taintObjectReference
andreference/react/experimental_taintUniqueValue
into Chinese, I'm thinking the deep meaning of the word "taint".The explanation of the "taint" is to damage or spoil the quality, or the effect of something bad or unpleasant that spoils the quality, which carries a somewhat negative connotation. However, considering the documentations' description of the APIs, it's difficult to detect any negative sentiment. In terms of meaning, it appears that "taint" simply signifies the marking of something with some special behavior.
I understand that Kubernetes has related concepts regarding "taint", but I feel that these two cannot be directly equated. I would like to know how React describes the meaning of "taint"?
Thanks a lot.
The text was updated successfully, but these errors were encountered: