@tster said:
@KattMan said:And you are supporting my statements. For brevities sake I limited this to two with the statement "(barring the other unusual chromosonal combinatations)". The statement basically becomes "What is your Gender?" The answer is neither true or false but rather Male or Female, hence it is not a boolean, because you can always add the third "non-disclosed".
There are, afterall, 5 chromosonal sexes in the human race, most are familiar with the XY and XX sexes being male and female. There is also XYY, XXY and XXX, all of which appear to be female in gender but are infertile. They are rare and we will see them as female. The other mutations you suggest still fall into these chromosonal catagories so a gender enum could be limited to 5 items, still not a boolean. Additionally, there is no YYY combination because there is always a female addition from the mother.
HOWEVER! Sometimes when asking for gender you are wanting to know if you should put Mr. or Ms. on the top of the letter you send them. In such a case it makes more since to ask "Are you a man?" or "Are you a woman?" because that way you will get salutation that they desire. Some transvestites might consider themselves men and some might consider themselves women.
I would say that in most applications you couldn't care less about any classification beyond male/female. You can argue the ethics of that all you want. If your goal is to merely store the information male/female, it isn't all that weird of a step to use true/false. The error you are making is in thinking true/false still means true/false. You basically changed the semantics to mean something else. Now I would agree that in modern high level languages this is poor programming, since you want to program for clarity. However, in lower level languages it becomes perfectly acceptable. In fact, in C I would argue that designating a true/false value to a bit is misleading, because what you really ask with 'boolean' operators is 'is it zero or not?' This gives false alot more values than true. Of course, if you're programming in C, you should either be put out to pasture, or you're a pretty good programmer who has to optimalize for efficiency (either bits or speed) in which case creative use of data structures becomes an art not a liability.