Myers-Scotton has developed what is termed markedness model of conversational code-switching. The main idea of this model is that, for a given interaction, there is an unmarked choice, that is, a code which is expected in the specific context (Scotton 1983, 1993, 1998).

-She distinguishes between four code-switching patterns prevalent in her African data such as: code-switching as a series of unmarked choices between different languages; codeswitching as a marked choice; and code-switching as an exploratory choice.
-Code-switching may be associated with a series of unmarked choices when aspects of the context such as a change in topic or in the person addressed make a different language variety more appropriate.
-In the following example, a visitor to a company speaks with the security guard in Swahili, the usual language for such interactions between strangers. When the security guard discovers the visitor comes from his own ethnic group, he switches to their joint ethnic language, Luyia, which indexes their common identity and marks the relationship as one between ‘ethnic brethren’ rather than strangers. When another visitor approaches, the security guard switches back to Swahili to address him.

-What is the function of code switching in this case?

In this case, the function of code-switching is to establish and maintain social relationships and identities. The security guard initially uses Swahili, the usual language for interactions between strangers, to communicate with the visitor. However, when he discovers that they share the same ethnic group, he switches to their joint ethnic language, Luyia, to create a sense of common identity and establish a bond between them. This code-switching serves to mark their relationship as one between "ethnic brethren" rather than strangers. Additionally, when another visitor approaches, the security guard switches back to Swahili to address them, indicating a shift in social dynamics and the code being used based on the specific context and participants involved.

In this case, the function of code switching is to signal and establish different social relationships and identities. The security guard initially uses Swahili, which is the expected and unmarked choice for interactions between strangers. However, when he realizes that the visitor comes from his own ethnic group, he code switches to their joint ethnic language, Luyia. This code switch serves to index their common identity and mark the relationship as one between "ethnic brethren" rather than strangers. It reinforces their shared cultural background and enhances a sense of solidarity and closeness. Additionally, when another visitor approaches, the security guard switches back to Swahili, which is an unmarked choice, to address the new person, thereby signaling a shift in the social context and demonstrating adaptability based on the interlocutors' identity and relationship.