Hacker News new | ask | show | jobs
by OscarCunningham 1778 days ago
I think the thing which came surprisingly late in history wasn't having a concept of 'none' but rather of allowing it to be considered a number with the same status as 1, 2, 3 and the rest.

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!)

1 comments

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.
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.