Does your game oppress minorities? You are making games, right?
(media.scored.co)
Comments (26)
sorted by:
if anyone has any complaints, we kindly refer you to our ESG department. please note our ESG policy
The Nigger License is already a thing.
"public boolean isMale;" is more efficient and does the same thing, since it is just a binary value.
isFemale is even better. You can rely on the initial value for the default case (depending on language).
Hooray for baby languages that have default initialization for everything, even if you're going to immediately overwrite it.
WRT to the screenshot though, I'd allow for one more enum value: "Freak" -- making a bool unsuitable.
I would encode it something like {invalid, male, female}.
Also a good option.
Sure, but even ANSI C has a default 0 initializers for static objects. It's right there on page 219 of K&R you young whelp :)
I had to rewrite this. I think static objects initialized to 0 or uninitialized get allocated to global space that the OS or the C runtime is obligated to zero.
That's why I declare enums without a valid 0 value. There is basically no cost to doing so.
That's actually a good idea. I'm going to adopt that for non-flags enumerations.
For flags, you can use a valid bit so an uninitialized 0 value still reads as invalid.
bool * isFemale = (bool*)malloc(sizeof(isFemale));
Its been 10+ years since I took a C course. If I recall correctly malloc() initializes to garbage memory values, calloc() initializes to 0 by default.
If you must include trannies for some reason "public boolean hasAGP;" is an efficient way to go about it.
It's not necessarily more efficient - a boolean is probably going to be padded to a full word, the same as the integer representing the various enum values.
But that would not make it 100% clear there are only 2 genders, since the snowflakes can consider themselves to be neither. Sometimes you have to sacrifice efficiency for the oppression of minorities.
You should have done
Male
Type B
Male
Birthing person
LMAO
If you add entries for trans, the setter in your class can not only set the actual gender, but also raise the "mentallyIll" flag.
The enumeration needs to be labeled "Sex"
True
{
}
Vertically aligned curly brackets master race.
Not a computer surgeon, but I think at least C#, C and C++ allow bitor operations on "enums".
At least Java doesn't allow this.
My real gender doesn't match my assigned at declaration gender, you bigot!
Feminist extremism detected. Male is 0, Female is 1.
are you?
not a retarded obnoxious question, if you are i wanna know about it, maybe help out if it's worth a damn
Yes I am. Already finished a bunch of small projects, nothing commercial though.