Is it appropriate to refer to a person of unknown sex by "it"?
Solution 1:
It is pejorative with reference to living beings, esp. social beings. It refers to an inanimate object.
Stay with the user throughout, for consistency, for political correctness and for consideration towards the reader.
Next, rephrase sentences to circumvent the issue of direct reference:
The user defines two variables, x and y, and then multiplies each variable by a prime number.
should do.
True, earlier some people used to refer to a newborn as it, but that is out of ignorance of the niceties. Never done in formal writing.
Solution 2:
I'm afraid it would be wrong. You should never use it to refer to people, except perhaps when the word you are referring to is child and its sex unknown. You are not alone: on this website there are probably a hundred questions about which pronoun should be used for a person of unknown sex.
- The traditional neutral pronoun for a person is he, his, him: "The user does x. Then he throws his mouse out of the window."
- Others now use they, their, them instead: "The user does x. Then they throw their mouse(/mice?) out of the window."
Both forms are probably acceptable to most people. Some find using they confusing/ugly because it is plural. Sometimes people use she as a compromise; but this is still rare. The choice is yours.
Solution 3:
Contrary to the claims that one never uses it to refer to humans, we in fact do so regularly when announcing someone: "Who's calling?" "It's Joe."
Solution 4:
I think it has already been well established that you cannot use 'it' to describe a person. However, I also think it is very important that you know that one does not use the word 'he' in a situation that could involve a male or a female subject. Gender neutral language is now considered correct usage in universities and academia.
You could say 'he/she' but as someone pointed out above 'they' is the preferable option. It's like we often use 'their' for possession when we cannot say 'his' or 'her' since we don't know the gender of the possessor, e.g. 'The child wanted to by a lollypop but was disappointed as their favourite flavour was sold out'. In your example, use the third person plural pronoun 'they' and you can't go wrong.
Somebody above mentioned that the need for gender neutral language is nonsense to them. It is actually very important and regardless of your stance on the matter it is now considered correct and gender-specific language (usually masculine), such as 'he', (when referring to a someone of an unidentified gender) is frowned upon and considered outdated and incorrect. In this day and age, using gender specific language almost looks uneducated or in extreme cases - sexist.