One of the most common complaints I hear about THE CATCHER IN THE RYE is Holden Caufield's swearing--that it's not only offensive but it feels unrealistic because nobody would talk like that. Well, the truth is that he's not actually talking. In the vast majority of cases, the swearing is reserved for inner monologue. These are his thoughts we're reading because the book is narrated in first-person. When Holden's in dialogue with somone, he cleans up his language, as most people do. The swearing is a device, a cue reminding us when we're in Holden's head, and it's very effective.
Holden doesn't swear with the nuns or the ladies in the nightclub or with Phoebe or with Sally or Jane, etc. He cleans up his language when he's in dialogue with another character, maintaining a cleaner public personna, but when we're in his head, he's consistently "not phoney" and swears excessively.
I agree that the excessive swearing is offensive and nobody would talk like that unless they were really upset and this is key to understanding Holden. His swearing emphasizes that Holden's in a crisis. Outwardly he's maintaining self control while inside he's boiling over.
Holden's jargonistic delivery serves two primary functions: a) it gives color and reality to his character, helping to define him as someone who doesn't "give a shit" about impressing people (and is therefore not being phoney) and b) it makes the reader feel confided in by Holden the narrator, that he's being totally truthful and honest despite his avowed and amply demonstrated character trait of "kidding" people. The language tell us he's not kidding us, but he will kid some of the other characters, like the student's mother on the train.
We may not like the character because of his gratuitous cursing, but we certainly know him better for it.
Causes Monty Heying Supports