3 ms·
A very common one is two booleans with one combination of them being an invalid state (e.g. never are both bools true in a valid state but all can be false or a
by cma 2y ago
A very common one is two booleans with one combination of them being an invalid state (e.g. never are both bools true in a valid state but all can be false or a mixture). Use an enum instead that represents only the three valid cases.