|
|
|
|
|
by devenblake
1859 days ago
|
|
>Consider using a gender neutral title like Mx – or earn yourself a doctorate. Haha, yeah, I think if they'd go as far to assume all women there (or all women past 30) have kids it would be pretty easy to assume any Doctor is a man. Also slight nitpick of the title: if(gender == "female" && married && age >= 30) would work just as well. But the use of strings for the gender field is excellent practice! Not only for non-binary gender(s) but also for "unknown" and any other edge cases. |
|
Sadly true.
> But the use of strings for the gender field is excellent practice! Not only for non-binary gender(s) but also for "unknown" and any other edge cases.
I can see this option more popular nowadays due to the gender discussion, but how did they manage unknown back in the day if they used a boolean for this (I assume something like isMale or isFemale)?