4 ms·
You can go further with some simple rewriting rules. For instance, if (condition) { variable = true; } can be rewritten as variable |= condition; So
by Thiez 5y ago
You can go further with some simple rewriting rules. For instance,
if (condition) { variable = true; }
can be rewritten as
variable |= condition;
So if we're streamlining the sexism we end up with a more pleasing
hasChildren |= gender == "female" && married && age >= 30;
- vidarh 5y agoYou're assuming you know which language this made-up code was written for.
- Hypergraphe 5y agoNice, I would add some parenthesis after |= to enhance readability ;)