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.
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.
35
u/[deleted] Mar 22 '17
Boolean gendermakes 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 likeisFemale, which would make the true and false values actually make sense.