Skip to content
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

Remove use of blacklist/whitelist terminology in code #2622

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

mrlacey
Copy link
Contributor

@mrlacey mrlacey commented Jun 8, 2020

Description

  • Replace the use of the term "BlackList" with the term "BlockList"
  • Replace the use of the term "WhiteList" with the term "AllowedList"

Motivation and Context

Removes the use of terms with negative racial connotations and replaces them with neutral terms.

How Has This Been Tested?

Changes are limited to comments and property names.
No impact was verified by rebuilding the code and ensuring no unit tests have been broken.

Screenshots (if appropriate):

n/a

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jun 8, 2020
@mdtauk
Copy link
Contributor

mdtauk commented Jun 8, 2020

+1

@Arlodotexe
Copy link

May I suggest instead "GreenList" and "RedList"

@mrlacey
Copy link
Contributor Author

mrlacey commented Jun 8, 2020

May I suggest instead "GreenList" and "RedList"

I've never seen these terms used anywhere else. Is there a precedent for their use elsewhere?

Using colors like this also relies on some assumptions about what the colors mean. You're relying on someone knowing that (presumably) green means good, allowed, or ok, and red means bad or blocked. Other cultural associations can risk color based terms being confusing for some.

@mdtauk
Copy link
Contributor

mdtauk commented Jun 8, 2020

Red in Asian cultures is more positive and means good luck.

@marcelwgn
Copy link
Collaborator

I think an issue with "GreenList" and "RedList" is that those are not common terms and could create ambiguity, e.g. those could also be used to refer a list of shades of green/red.

@MikeHillberg
Copy link
Contributor

+1 to "block" and "allow".

@Felix-Dev
Copy link
Contributor

Looking at https://english.stackexchange.com/questions/51088/alternative-term-to-blacklist-and-whitelist it seems "Safelist" is a good suggestion to go along with "Blocklist".

@meldim
Copy link

meldim commented Jun 8, 2020

I think in this particular case it might be worth considering a more explicit name for those properties like "invalidPropertyNames" or "forbittenPropertyNames" or something along these lines instead of "PropertyNamesBlockList", especially since they are not even an actual list.
I would rather eliminate the bad convention of using the terms "Black/White list" instead of replace them with a new one.

@mdtauk
Copy link
Contributor

mdtauk commented Jun 8, 2020

Looking at https://english.stackexchange.com/questions/51088/alternative-term-to-blacklist-and-whitelist it seems "Safelist" is a good suggestion to go along with "Blocklist".

"Safelist" could be a bit of a loaded term, depending on the context. Block and Allow seems more generic, and applicable in multiple situations and contexts.

@marcelwgn
Copy link
Collaborator

I would rather eliminate the bad convention of using the terms "Black/White list" instead of replace them with a new one.

Yes i think that's a good idea.

Having those lists be named "AllowedPropertyNamesList" and "ForbiddenPropertyNamesList" or "BlockedPropertyNamesList" are better than plainly replacing it with a different name for those two words.

@Felix-Dev
Copy link
Contributor

@mdtauk

"Safelist" could be a bit of a loaded term, depending on the context.

Out of interest, please elaborate (perhaps native (UK) English speakers have a specific view on this term compared to non-native speakers.)

@ranjeshj
Copy link
Contributor

ranjeshj commented Jun 8, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mdtauk
Copy link
Contributor

mdtauk commented Jun 8, 2020

@mdtauk

"Safelist" could be a bit of a loaded term, depending on the context.

Out of interest, please elaborate (perhaps native (UK) English speakers have a specific view on this term compared to non-native speakers.)

Well if we have an allowed list of APIs, it implies that if it is not on the "Safelist" then it is unsafe to use, rather than just not allowed.

@bartlannoeye
Copy link

@mrlacey for consistency, shouldn't it be BlockedList?

Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@StephenLPeters
Copy link
Contributor

@mrlacey for consistency, shouldn't it be BlockedList?

or AllowList + BlockList

@ranjeshj ranjeshj merged commit 52c6013 into microsoft:master Jun 8, 2020
@mrlacey mrlacey deleted the NamingMatters branch June 9, 2020 10:28
@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Jun 9, 2020
@robloo
Copy link
Contributor

robloo commented Jun 9, 2020

Naming really is inconsistent, as already pointed out, and now violates API design principles . The terminology itself is wonky and should be something like AllowedPropertyNames/ BlockedPropertyNames if we keep standard rules. Note that 'List' shouldn't be included on these types of properties. The term ordering also should be such that it sounds correct in English (Naming for sort ordering isn't the convention)

Best:
AllowedPropertyNames
BlockedPropertyNames

In any case at least align the tenses:

Alternate 1:
PropertyNameAllowedList
PropertyNameBlockedList

Alternate 2:
PropertyNameAllowList
PropertyNameBlockList

I wouldn't have merged this without some additional fixes.

@ranjeshj
Copy link
Contributor

ranjeshj commented Jun 9, 2020

Apologize if I merged a bit early. The names should not affect any public APIs. Please feel free to create a new PR with updates.

Kinnara added a commit to Kinnara/ModernWpf that referenced this pull request Jun 12, 2020
@msft-github-bot
Copy link
Collaborator

🎉Microsoft.UI.Xaml v2.5.0-prerelease.200708003 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.