The best programmers I've worked with swore at their coworkers regularly, but never in their code.
They were not great people, and I'd happily kick them in the face if I would encounter no legal or professional repercussions, but, there definitely does seem to be some correlation (in my experience) between being abrasive and being a skilled programmer.
Swore at or swore while talking to? There's quite a big difference. I don't see profanity as inherently abrasive, and some of the biggest dickheads I've met in workplaces didn't swear much at all (some were of the Professor Umbridge type, so kept up an air of perfect professionalism)
literally right there in the comment. "swore at regularly".
Anyways, I definitely agree that swearing isn't the same as abrasive, but swearing at people is definitely an abrasive trait. Also agree that some of the biggest dickheads around keep up an air of professionalism.
RIP. Likely the Platonic Ideal of an abrasive programmer.
I'd put mid 00s Linus Torvalds as the apotheosis. Despite being an incredibly abrasive person, he has left a mark on history.