Chromium devs working to make Chrome’s code racially neutral

A recent code change seeks to safely change over 2,000 references to 'blacklist' into 'blocklist' without breaking the browser

Some Chromium developers have decided to push towards Google’s goal of ‘racially neutral’ code.

As spotted by 9to5Google, a new code change submitted to the Chromium Gerrit — an online collaboration tool for sharing, reviewing and merging code into the open-source codebase of Chromium — seeks to safely replace every instance of the word ‘blacklist’ without breaking the browser.

The move comes as people around the world continue to protest in support of Black Lives Matter. However, the roots of Chrome’s racially neutral code goal go further back. In October 2019, the Chromium open source project introduced guidance in its official code style guide on how to write racially neutral code. For example, it urges developers to avoid terms like ‘blacklist’ and ‘whitelist’ in favour of neutral terms like ‘blocklist’ and ‘allowlist.’ Below is an excerpt from the guide about racially neutral code:

“Terms such as “blacklist” and “whitelist” reinforce the notion that black==bad and white==good. That Word Black, by Langston Hughes illustrates this problem in a lighthearted, if somewhat pointed way.

“These terms can usually be replaced by “blocklist” and “allowlist” without changing their meanings, but particular instances may need other replacements.”

Further, 9to5 notes that Google began swapping out ‘blacklist’ for ‘blocklist’ as far back as May 2018. While consumer-facing instances have largely changed over, several internal code sections continue to use the terminology, such as one section called ‘components/blacklist.’

The new code change seeking to change everything from ‘blacklist’ to ‘blocklist’ even tackles that section, which should be called ‘components/blocklist’ going forward. In total, the change address over 2,000 references to the word ‘blacklist’ in the Chromium code.

Although there is likely still much work to be done, it’s encouraging to see people taking action to combat racism in whatever ways they can, big or small. Changing several terms in code that most of us will never actually see may not seem like a big deal, but considering how many browsers operate off of Chromium code, the change is actually quite far-reaching.

Source: Chromium Gerrit Via: 9to5Google