Code switching results from a conscious decision to promote the validity of the author's heritage language. Encouraging students to promote the validity of their mother language may improve second language acquisition and proficiency.
Originally "Spanglish" and other forms of bilingual code-switching was viewed as an inferior mode of communication. Many educators now view code-switching as beneficial because it promotes language proficiency in learners who may have been deficient or even illiterate in the mother language.

Additionally, teaching heteroglossia, the existence of two or more voices within a text, can be taught for the benefit of viewing literary figures from the lens of sociolinguistic character analysis. This technique may also help students become more comfortable with writing dialogue that is useful for subtly delivering
expository information to it's audience while considering what judgments readers make about certain language choices. There are many lessons that can be taught through code-switching.
With the United States being the continuously growing melting pot that it is, nearly every classroom will have at least one student whose native language is one other than English. t is important that, when assigning writing activities, teachers allow their students to incorporate their native language into their writing. Because teachers do not always understand their students’ native language, it may be an instant reaction not to allow students to do this; however, students will most likely express
themselves better if they are able to combine their native language with the English that they are familiar with (i.e. code-switching). This being said, code-switching is significant when writing, as it allows the student to use his own primary language as a means of enhancing, and maybe even elaborating on, his writing, thus making it more unique to him.
The use of code-switching in English writing helps us to realize the ethnicity of the country and allows us to see it as multilingual. It allows non English-speaking students to relate and understand the English language better and allows English-speaking students access to elements of foreign languages.