4 ms·
> incidentally depending on non-zero numbers to become True, and zero to become False I don't feel that there is anything incidental about that. Integer zero i
by eriknstr 9y ago
> incidentally depending on non-zero numbers to become True, and zero to become False
I don't feel that there is anything incidental about that. Integer zero is logically false and any other integer is logically true.
- scott_s 9y agoIncidental to properties of numbers themselves; it's a part of the language, not a part of numbers. The function is asking a question about the property of numbers. I find it more clear when the computation to determine that property depends on number properties, not language properties.
- eriknstr 9y agoThat is a good point, and it makes sense to think of it that way. However I think that it can also be a bit "dangerous" to think too much in terms of the properties of the numbers when working with software due to the fact that for example arbitrary floats cannot be precisely represented in a limited amount of bits like we have in computers. I already hold the view that the numbers we are dealing with when working on computers are an incomplete representation of the ideals of ℝ and ℂ and their likes, so to me then it is ok to reason about code in terms of properties that stem from the language in use.