Here is the Encyclopedia Britannica’s helpful definition:
Code-switching, process of shifting from one linguistic code (a language or dialect) to another, depending on the social context or conversational setting. Sociolinguists, social psychologists, and identity researchers are interested in the ways in which code-switching, particularly by members of minority ethnic groups, is used to shape and maintain a sense of identity and a sense of belonging to a larger community.
In popular culture and particular among African Americans code switching is either with ambivalence or even outright hostility. The Urban Dictionary definition illustrates this. It defines “code switching” in neutral terms while the hashtags following captures the ambivalence or outright hostility many feel about the practice.
This piece from NPR’s Code Switch podcast seems to imply that Code Switching is somewhat sketchy or in some way a cop-out that nonetheless needs to be owned up to.
The words “power and peril” in the title of the Guardian review of the movie “Sorry to Bother You” perfectly illustrates ambivalence towards code switching:
Long before Sorry to Bother You taught moviegoers the meaning of code-switching – the act of altering how you express yourself based on your audience – I learned its power by listening to my father take phone calls. While checking in with his mother in Georgia he’d drift into a black southern lilt, subtly prolonging vowel sounds as he reverted to his childhood timbre. From there, he’d answer calls from his white co-workers, ingratiating himself with carefree enthusiasm and a formal syntax while deftly employing his lawyerly lexicon.
But at the barbershop, my father was best at being himself. As soon as the shop’s door swung open, I’d watch him relax his stance before strutting towards the owner of the shop. As if preparing to bounce, he’d walk with a slight bend in his knee, greeting him with an ardent “My man!” before dapping him up. From there, he’d pay similar respects to the other barbers and fellow customers, often extending a hug to the older women waiting for their sons, smiling at shopgoers the way you smile at family. And as the barbershop buzzed with local gossip and philosophical debate alike, I’d hang on my father’s every word, listening to him drop the “r” from “brother” or the “l” from “alright” or the “g” from seemingly any verb. At the shop, he was cool in a way only black people can be cool.