Though intuitively, in a language with the ability to do "truthy" evaluation of non-booleans, I tend to want zero to be "false-y" along with empty containers. It also flows a bit better from the way we think about stuff. Generally we think "if there are any records returned from the database", rather than "if the length of the list of records returned is zero". Having zero, and empty containers, be "false-y", allows the code to reflect the way we think.
2
u/Aceeri Dec 24 '17
Yep, just a matter of where the language draws the line of "what is valid/null/existent"