[a] Some scholars use the terms "code-mixing" and "code-switching" interchangeably, especially in studies of syntax, morphology, and other formal aspects of language.
Especially in formal studies of syntax, morphology, etc., both terms are used to refer to utterances that draw from elements of two or more grammatical systems.
Some work defines code-mixing as the placing or mixing of various linguistic units (affixes, words, phrases, clauses) from two different grammatical systems within the same sentence and speech context, while code-switching is the placing or mixing of units (words, phrases, sentences) from two codes within the same speech context.
[citation needed] While many linguists have worked to describe the difference between code-switching and borrowing of words or phrases, the term code-mixing may be used to encompass both types of language behavior.
Beginning at the babbling stage, young children in bilingual or multilingual environments produce utterances that combine elements of both (or all) of their developing languages.
More recent studies argue that this early code-mixing is a demonstration of a developing ability to code-switch in socially appropriate ways.
[5] For young bilingual children, code-mixing may be dependent on the linguistic context, cognitive task demands, and interlocutor.
[6] In psychology and in psycholinguistics the label code-mixing is used in theories that draw on studies of language alternation or code-switching to describe the cognitive structures underlying bilingualism.
[8] They note that this is distinct from code-switching in that it occurs in a single sentence (sometimes known as intrasentential switching) and in that it does not fulfill the pragmatic or discourse-oriented functions described by sociolinguists.
Unlike code-switching, where a switch tends to occur at semantically or sociolinguistically meaningful junctures,[c] this code-mixing has no specific meaning in the local context.