- cross-posted to:
- [email protected]
- cross-posted to:
- [email protected]
Gender: true
Even booleans take up 8 bits. And that’s a lot of wasted space.
That’s only due to technical reasons on weird platforms like x86, 64bit x86 or ARM.
That’s why you use bitarrays and bitflags instead when you need more than just one or two arguments for a function.
Solution: 1 bit computer
Clearly your gender field is a boolean. Which means it can be either true, false, null, or undefined. Except in javascript where for some reason it can sometimes be NaN, but only when you try to compare two people.
A boolean, so 8 bits of freedom to fill up
My gender is
{ toString: ()=>{String.prototype.toString = ()=>">:3"; return ":3";} }
Bold of programmers to assume gender can be expressed accurately in a finite discrete system. Gonna have to bust the Taylor series for some better approximation.
Gender is a pointer
Now is the time for quantum computing
Why not a linked list? Or a hash-table?
isMale
import isFemale def isMale(Person): if isFemale(Person): return False else: return True
public boolean isMale() { return !isFemale(); } public boolean isFemale() { return !isMale(); }
StackOverflowException was unhanded
Gender is obviously a signed byte.
Gender is a struct
struct Gender { byte binaryBias; ///Determines male (+) or female (-) bias if present ubyte binaryAm; ///Determines the amount of binary gender(s) present bool isTrans; ///True if assigned at birth gender does not equal with current one ubyte xenoAm; ///Determines the amount of xenogender uint xenoGen; ///Xenogender selection, 0 if not applicable Sex* sex; ///Pointer to the person's current sex }
Now this is a gender definition I can get behind. None of that string/enum crap, just raw data.
deleted by creator