This article analyzes the functions and motivations of literary code-switching and code-mixing in ten contemporary heterolingual novels. A microanalysis is followed by a more general typology. Thousands of instances of code-switching or mixing were coded according to form and function variables using a grid provided by software program Sphinx-Eurêka. A cross-referencing of these variables revealed the main characteristics of each novel, which led to a typology of heterolingual writing at the end of the 20th century. This typology places the the ten novels along the levels of a three-part pyramid. At the base is a “realistic” or mimetic approach which, doubled with irony, becomes parody, and finally, at the top, is the creative approach.