3 ms·
Personally, for readability purpose, this sounds a like a good idea. It is indeed (at least for me) harder to read a condition that has negation: if(!some-pred
by profalseidol 7y ago
Personally, for readability purpose, this sounds a like a good idea. It is indeed (at least for me) harder to read a condition that has negation:
if(!some-predicate)
Maybe it's because you have to do the negation mentally.
But more ideally, it should be done with polymorphism or similar rather than using if..else.