Beyond just political correctness, there are practical reasons to use it/they/them instead of him/her/he/she. As a native English speaker, using gendered pronouns to talk about the code is confusing. If I were just scanning a commment, I'd assume those gendered pronouns were referring to an author of the code or some other individual being cited.
Anthropomorphizing your code in comments is a bad idea in general.
I find it jarring to see a plural pronoun where a singular is correct. Reading "they" where "he" or "she" is appropriate causes a slight mental distraction and disrupts the message the writer is trying to convey.
I've always been taught and considered "he" or "him" to be gender neutral unless context indicated otherwise, in the same way that "man" can refer to any human and not just a male.
This is a tempest in a teapot if I ever saw one. Women are not underrepresented in technology because of male-gendered pronouns in code comments. As someone in the earlier discussion suggested, if you want to make a difference, quit complaining about pronouns and go help mentor some girls at your local school, Girl Scouts, Girl's Club, etc. If we had more females writing code, we would probably see more use of "her" or "she" in their comments.
It's only jarring if you harbor the misconception that "they" always requires a plural antecedent. But it does not. The distraction is coming from your own head, not from idiosyncratic usage. Better writers than us settled this long ago.
Henry Fielding: "Every Body fell a laughing, as how could they help it."
Thackeray: "A person can't help their birth." (spoken by Becky Sharp, the main character, with reference to her own social climbing)
George Eliot: "I shouldn't like to punish anyone, even if they'd done me wrong."
Lewis Carroll: "'Whoever lives there,' thought Alice, 'it'll never do to come upon them this size: why, I should frighten them out of their wits!'"
I don't see how anyone could read such examples of singular "they" and not immediately be relieved of any objection they may have been entertaining. The extraordinary thing is how modern it sounds, even when the rest of the language is archaic:
"Every one Sacrifices a Cow or more, according to their different Degrees of Wealth or Devotion" (Dr. Johnson)
"Let nothing be done through strife or vainglory; but in lowliness of mind let each esteem other better than themselves." (King James Bible)
Sometimes the formulation seems deliberately mischievous:
C. S. Lewis: "She kept her head and kicked her shoes off, as everybody ought to do who falls into deep water in their clothes."
Doris Lessing: "And how easy the way a man or woman would come in here, glance around, find smiles and pleasant looks waiting for them, then wave and sit down by themselves."
That last one (from Charlotte's Web) is delicious because White put the White in Strunk and White and knew full well when a writer should break his own rules.
Women are not underrepresented in technology because of male-gendered
pronouns in code comments.
I don't think anyone is seriously suggesting that.
As someone in the earlier discussion suggested, if you want to make a
difference, quit complaining about pronouns and go help mentor some girls at
your local school [...]
I believe promoting more inclusive language does make a positive difference. Regardless, can't one do both of these things? I don't see how they're incompatible.
Based on the examples on the page it doesn't look like they are doing that. They are talking about the "user" which depending on context might be the programmer using the API or the end user using the application.
But I think this gets to the root of the problem. Text with generic pronouns can get clumsy , especially so if the grammar is less than perfect.
"He" or "She" removes any ambiguity that you are referring to a singular person. Whereas "they" could mean a single person, a group of people or some inanimate object. So a gendered pronoun can make your writing clearer but of course forces you into a specific gender.
Historically "He" was often used as a pronoun which could be considered either gendered or gender neutral dependent upon context.
That is the opposite of my understanding of the history here; my understanding is that "they" has, for most of the history of written english, been used a gender-neutral singular pronoun, and that it was a prescriptivist movement in the late 1800s that attempted to away with that practice.
The gender neutral singular "they" has a long history, is correct, and should be uncontroversial.
You misread me. The effort to eradicate singular "they" is a late 1800's movement, and, I agree, that movement is archaic. The singular "they" has been a feature of English since Chaucer and remains current; Conrad used it, as did CS Lewis.
> "He" or "She" removes any ambiguity that you are referring to a singular person. Whereas "they" could mean a single person, a group of people or some inanimate object.
You can't just drop a pronoun like "they" or "he" in without a previously-named referent (the way you could with "one" or "many"), so the kind of ambiguity you refer to here is almost never a problem in practice. Its only an issue which creates a difference between the two pronouns in the case where there a multiple named referents already to which the pronoun could be referring, and some are in the broader class that "they" can refer to but not in the class that "he" can refer to.
We're used to looking at a pronoun's antecedent to determine its subject. In the sentence, "Jacob finally published a post he'd been mulling for a long time," we don't object that it's unclear whether "he" refers to Jacob. I don't understand why "The user receives the data they requested" is so fundamentally different. You still look to the antecedent; it's still clear.
I grew up taking great pride in "correct" English usage, but I now think insisting on gendered pronouns causes harm without any tangible benefit.
But that's also clumsy because you end up with sentences like:
"The user switches on the user's computer and types the user's name".
Rather than the shorter and better flowing:
"The user switches on her computer and types her name"
We have the concept of "user stories" the idea of which is that they read like stories. Since stories tend to have gendered characters (even when not necessary) this is just the sort of writing that tends to work best in english.
I don't understand how. Is the user female? Must she be? Why did the author choose a gendered pronoun when they had a gender-neutral one available to them? There must have been a reason; the author isn't assumed to be ignorant of basic English.
There are a few reasons why a gendered pronoun might be used:
1. To indicate 'a human' as distinct from 'a machine', where 'they' is insufficiently clear
2. To refer to an actual person of known gender
3. Most European languages have a notion that inanimate objects have a gender, so they might refer to a computer or a dress as 'he' or a yacht or a book as 'her'. This makes little sense to native English speakers but can be a difficult habit to drop.
I think it's pretty clear that none of these are valid uses in this case (although I wonder if #3 might have some responsibility for the initial commit? Would be good to get some input from someone who knows more than I do about linguistics).
However, I'm not sure that 'they' is much better, because it's still anthropomorphic - it implies that the calling function is a person, which isn't true - it's a function. The correct word must be 'it' - there is no 'they' in one function calling another function.
Anthropomorphizing your code in comments is a bad idea in general.