The Two Kinds of Integers
Code: , , , ,
No comments

A small thing I see tripping up developers is that there are two kinds of integers: numbers and identifiers.

We don’t know what the integer 4 means unless we know what it’s for. Are we counting things, or identifying them? It’s really easy to slip between the two, like this real code snippet I found:

Continue this post