Numeric derangements

I started the morning by writing a sharp screed on the two kinds of numbers, but have managed to convince myself it sounds dangerously like a tinfoil hat talking. So I'm pressing DEL on the whole thing, beyond this remark:

There are numbers for counting, and a different kind of numbers for measuring. Superficially they are similar, but so are octopi and squid *.

I always assumed that using measuring-type numbers for arrays and pointers in C  rather than counting-type numbers was an example of the original programmers just not thinking hard enough about the problem.
The subtleties of numeric conversions are often ignored : consider how many smart people think that  0.9999...infinity !=1 .
But while tooling around the Net, I found this which has changed my opinion. They did think about it, they just picked the wrong type of numbers.

I'd like to say its moot, and I'll never forget that arrays start in position 0, but hey, I would have said that about initializing my variables, too. At least until yesterday.


* And most days I'd rather fight the former rather than the latter, but I'll eat either.

No comments:

Post a Comment