Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I'm missing the switch-case here. For if a gender gets added later on. Like "hermaphrodite", or "transgender", or "unknown".
Yes, "unknown" is a valid entry for unborn babies who's gender has not yet been determined. -
(also, ternary operator has its uses, but only because it looks more ""cool"" doesn't make it necessarily better)
-
@SweetHuman I was wondering why no one responded to that.
Seems like OP confused 3 and 6. -
@fredrf what do you expect, when the joke is "look, I'm not a newbie anymore, now I know how to do it", and posted in such a forum?
-
snypenet2358y@Robbatron It depends on where you are pulling your input data from. You could have a gendertypeid field in the database that just maps to a string, like so, in you application to be displayed on the page.
Personally I would just use enums at that point and be done -
fredrf15248y@Gauthier I see both views 😁
But I find it funny that a guy throws a joke and guys don't laugh or say it's a bad joke.
What people do is analyze.
I'm just point this out and find it funny 😁😁 -
Grumpy28878y@Robbatron Using an enum is better, but using a string is just throwing type safety out the window and asking for someone to mis-spell it.
-
The parameter "num" clearly refers to the number of times the caller tries to get sex. What does the return values actually mean? An URL to a pron site for all num>0 seems more appropriate...
If you know what i mean
undefined