3 ms·
It is similar as in C: When C come out, it did not include a bool type, since it could be easily implemented as integer or char. The result was, that every big
by PythonicAlpha 11y ago
It is similar as in C:
When C come out, it did not include a bool type, since it could be easily implemented as integer or char. The result was, that every bigger project had its own standard of the boolean type. This lead to the situation that bringing together different libraries or projects in the same company, you very soon had four or more different (and potential incompatible) boolean types with different constants for TRUE, FALSE, true, false and UNDEFINED. The programmers where happy to deal with those ...
It would be best (and fastest) to include something like default parameters into the language much sooner ...
But at least in this case, I see much less trouble as with the C type and I do not agree with the author that there is mental overhead involved with the OR operator, since you normally get used to it fast.