I have never worked on a big corporation. But I find interesting about corporations forbidding swearwords in code. I mean, the people responsible for forbidding swearwords rarely read code. And if they read code with any frequency and are somewhat proficient at it, most likely they have their own list of swearwords.
Also we should look to add more keywords to programming languages that trigger naïve filters. I'm all in for another era of broken censorship to poke fun at the people who know nothing, but always have an opinion.
> the people responsible for forbidding swearwords rarely read code.
In a previous workplace, the people in charge prohibited swearing in our code after they had the pleasure of reading those swearwords in a stack trace within a log generated by our software, which we received attached to a complaint email from a major customer.
As a simple fellow programmer, I don't want swear words in code I'm working on either? If it's in the code itself, you should be using better names. If it's in comments, I want information without extraneous modifiers. Not to mention, what one person thinks is an innocent swear might be considered very harsh by others.
There's just no good reason for swear words to be committed. You want to swear about the code, do it in a chat room or something.
> But I find interesting about corporations forbidding swearwords in code.
How common is this? I work in a big corporation and we have no such policy.
When we contribute to open source, there's a good chance they'll make us remove any. Internal code, though? Up to each team to decide.
Nobody at a large corporation is going to jeopardize their paychecks for some petty nonconformism.
> I mean, the people responsible for forbidding swearwords rarely read code.
Just plain not true.
I don't personally care about language choices in code, but I'll play devil's advocate and speculate as to why a business might be concerned.
1. Reputational harm in the event that code needs to be shared. Say, the code gets read in court, or an outside consultant is brought in who is given access to the code. The company likely wants to maintain the same standard of professionalism that they expect when their employees write or utter spoken language in the workplace for the same reasons.
2. Similar to #1 but nuanced enough to deserve its own mention: code is a business asset. It can be sold or licensed out. The company may fear that language that it deems unprofessional could depreciate the value of that code in the context of selling or licensing it to 3rd parties.
Personally I think that the fuss over "bad words" is deeply irrational to a religious degree. The idea that arbitrary sequences of phones or characters will cause anyone within ear or eye-shot to become offended is rather absurd. But you can't choose what planet you do business on and, on Earth, there are a lot of silly people.