Gender trouble

According to the Inform 7 manual, 3:17: “People can be male, female, or neuter: this is an attribute for the “person” kind…”.

This seems to imply that we are talking about a single attribute with three possible values. However, after some experimentation, it seems like there are actually two attributes at work here: One which can be male or female, and another one which can be neuter or not-neuter. I can make the some person male and neuter with no problems.
Is this is a bug or is that really how gender is supposed to work?

That’s how it is supposed to work.
Appendix A (an official, very heavily commented version of the Standard Rules that can be found here:http://inform7.com/sources/src/stdrules/Woven/index.html) explains it thus:

According to that explanation it should be impossible for something to be both male/female and neuter at the same time, but my problem is that this doesn’t seem to be the case. I can make the same person both male and neuter. Consider the following:

[code]The barn is a room.

The cow is a person in the barn. The cow is male and neuter.

The description of the cow is “[If the cow is male]A male cow[end if][if the cow is neuter]A cow of unspecified gender[end if].”[/code]

Examining the cow produces the text: “A male cowA cow of unspecified gender.”.

The reason this is a problem is because I have objects which are supposed to start out neuter, and only get assigned a gender when the player learns more about them. Assigning the male/female gender doesn’t override the neuter value, so I have to do that manually, which is both annoying and error-prone.

Maybe a less error-prone way would be to do it with a set phrase?

To make (subject - a person) female: now the subject is female; now the subject is not neuter.

And then use “make the cow female” wherever you’d otherwise say “now the cow is female.” Of course this might be annoying to put into your existing code.

Yeah, I think the library is inconsistent about this. The comment says that the neuter attribute overrides the others, but in fact all the library’s pronoun routines treat “female” as overriding “neuter”.

[quote]
The description of the cow is “[If the cow is male]A male cow[end if][if the cow is neuter]A cow of unspecified gender[end if].”
[/quote

This text can never behave properly, because underneath, “male/female” and “neuter/not neuter” are independent properties. Every person will respond to either “if X is male…” or “if X is female…” You can’t change that (without completely rewriting the library’s notion of gender). So you have to write smarter descriptions:

The description of the cow is "[If the cow is male and the cow is not neuter]A male cow[end if][if the cow is neuter]A cow of unspecified gender[end if]."

The extension here makes the genders independent of each other. With this extension, all things except men and women but including animals start out ‘neuter’, ‘not male’, and ‘not female’, and gender is not restricted to persons.