Skip to content

How to understand the word "taint" in the new APIs taintObjectReference and taintUniqueValue? #6343

Description

@Yucohny

When I'm translating the docs reference/react/experimental_taintObjectReference and reference/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.

Activity

  1. eps1lon commented on Oct 7, 2023

    @eps1lon
    Member

    I'd look at how tain checking or related concepts in Computer Science are translated. Does that help?

  2. Yucohny commented on Oct 7, 2023

    @Yucohny
    Author

    @eps1lon Thanks for you response.
    In traditional computer science, the meaning of taint may be consistent with its original meaning - taint means the effect of something bad or unpleasant that spoils the quality (as a noun).
    It is true that it can be understood and translated in this way in the experimental_taintObjectReference document, but it still feels a bit far-fetched.
    What makes me really confused is that the word taint seems to have a certain negative emotion (in computer science, the term taint is indeed more used in such scenarios), but in the React docs it feels It's less of a negative emotion and more of a neutral meaning.

  3. loveloki commented on Oct 7, 2023

    @loveloki
    Contributor

    The word taint reminds me of dirty.

    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 dirty?

    It seems to be used to mark the object with special behavior, such as in the taintUniqueValue api, it marks objects which should not be sent to the client?

  4. awxiaoxian2020 commented on Oct 16, 2023

    @awxiaoxian2020
    Contributor

    The point is that why does React use taint rather than label or mark and so on?

  5. lunaleaps commented on Oct 18, 2023

    @lunaleaps
    Contributor

    taint offers more insight into why we're tracking certain object/values due to the CS concepts linked. I think to address the question of translation, you can explain its usage as "marking" as you mention. I don't believe the subtle difference between taint and label is something that needs to be emphasized.

  6. Huxpro commented on Oct 25, 2023

    @Huxpro
    Contributor

    The point is that why does React use taint rather than label or mark and so on?

    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

  7. Huxpro commented on Oct 25, 2023

    @Huxpro
    Contributor

    What makes me really confused is that the word taint seems to have a certain negative emotion (in computer science, the term taint is indeed more used in such scenarios), but in the React docs it feels It's less of a negative emotion and more of a neutral meaning.

    @Yucohny in fact, it IS used for marking something negative (potentially hurting security) and that is the motivation for introducing these APIs

  8. Huxpro commented on Oct 25, 2023

    @Huxpro
    Contributor

    taint offers more insight into why we're tracking certain object/values due to the CS concepts linked. I think to address the question of translation, you can explain its usage as "marking" as you mention. I don't believe the subtle difference between taint and label is something that needs to be emphasized.

    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".

  9. reopened this on Oct 25, 2023
  10. lunaleaps commented on Oct 25, 2023

    @lunaleaps
    Contributor

    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!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions