Re:Crows have been shown to understand the concept of zero
by martincmartin on Tuesday August 10, 2021 @02:01PM
(#28132077)
You see this in programming languages too. Many languages distinguish between one of something and a collection of them, e.g. int x vs vector<int> x. In other languages, like Matlab, everything's a vector, and a scalar is just a vector of length one.
Re:Crows have been shown to understand the concept of zero
by burnished on Tuesday August 10, 2021 @04:39PM
(#28134151)
Well, its not that they distinguish between one of something and a collection, its that one of something is different from a collection of things.
So, int x is a handle to an integer value, whereas an array handle (your collection) is a handle to a pointer, which points to the start of your data structure and you can get the other elements by using an offset etc. etc.
My point being that they are differentiated because they are different things.
Indeed some of the ancient Greeks were of the opinion that 1 was not a number (since numbers were for counting a plurality of things).
It's quite the realisation that you can use the usual rules of arithmetic for 1 and 0, and not have anything go wrong. (Except of course division does go wrong!)