I have a 64-bit gender
I have a 64-bit gender
I have a 64-bit gender
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.
Only if it's performance sensitive. Otherwise you're wasting programmer time both writing and reading the code, and you've made it less maintainable with more complexities where bugs can creep in.
The vast majority of the time you can afford a few wasted bits.
Honestly though I don't quite understand why a compiler couldn't optimise this process. Like it knows what a boolean is, surely it could reduce them down to bits.
Solution: 1 bit computer
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.
I guess in theory as there will only ever be a finite number of individuals, there will also necessarily only ever be a finite number of different gender expressions, so finite discrete probably works. (Not to say that peoples experiences of gender are fixed and equidistant, but more so that you could have a "gender enum" with an entry for each individual)
Of course, trying to say how many bits this would require is almost impossible because theres always going to be more people and more genders, but it is technically finite.
In any case, bagsies on (leading zeros)100101001
Me on my way to define everyone's gender:
enum Gender { AARON, ALEX, ANN, ...
finite number of individuals, there will also necessarily only ever be a finite number of different gender expressions
This only demonstrates that there will be a finite number of genders at any given instance. One could be more fluid and a responsive gender such that it maximizes the gay of any particular kiss they are having at the time.
Now is the time for quantum computing
My gender is a null-pointer.
Gender is a pointer
Why not a linked list? Or a hash-table?
Gender: true
Gender is obviously a signed byte.
Gender is a struct
c
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 }
rs
gender: impl Any
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.
My gender is
A boolean, so 8 bits of freedom to fill up