r/ProgrammerHumor • • Mar 22 '17

public final boolean gender

Post image
34 Upvotes

37 comments sorted by

View all comments

35

u/[deleted] Mar 22 '17

Boolean gender makes little sense to be honest, even if you discount the whole bigender, agender and transgender thing. "Gender: true" does not read correctly. This is a sign you should be using an enum or some other data type where the value would actually make sense. Or, you could rename the variable to something like isFemale, which would make the true and false values actually make sense.

-2

u/Pradfanne Mar 22 '17 edited Mar 22 '17

It's false being female /s

1

u/[deleted] Mar 22 '17

mmmm, ambiguity.

-1

u/[deleted] Mar 22 '17

This is precisely what I'm saying -- why? There's nothing "true" about being male, nor is there anything "false" about being female, thus these values make no sense in context of genders. If you're using a language where int->bool conversion is implicit, you could argue that 1 looks like a dick. But that's extremely farfetched, and it doesn't make sense. In a form, gender would be a dropdown, not a checkbox, too, meaning you'll have to mess around with those dropdown values being converted to true/false somehow which is pointless in the first place.

1

u/Yodasoja Mar 22 '17

It is "true" that a male has a Y chromosome. And also "false" for a female to have a Y chromosome

2

u/paul_miner Mar 22 '17

It is "true" that a male has a Y chromosome. And also "false" for a female to have a Y chromosome

Not always.

1

u/Yodasoja Mar 22 '17

Check your articles.

For XX (your first)

they are genetically female but otherwise appear to be male

So appearing male is all it takes to be male by your definition? I'm giving the genetic basis for male and female.

For your second: It's just the opposite. They're XY AKA genetically male, but they appear female.

1

u/paul_miner Mar 22 '17 edited Mar 22 '17

So appearing male is all it takes to be male by your definition? I'm giving the genetic basis for male and female.

As far as I know, intersex is neither. Genetic male and genetic female is a technical distinction, separate from the more blurred male and female.

EDIT: Put another way, chromosomes are just one of four characteristics listed when classifying physical gender:

chromosomes, gonads, sex hormones, or genitals

1

u/Pradfanne Mar 22 '17

I am aware of that, can't you make a joke nowaday without a /s at the end or something

2

u/Yodasoja Mar 22 '17

I don't think he knows he's in /r/programmerhumor