Has anyone else (in C) wrapped an int type in a struct to avoid accidental mixing of ints with different semantic values?
@jbk Typically we use typedefs to provide a semantic distinction. This is sufficient for the programmer. I kinda like your idea for telling the compiler as well.
On a similar vein I have been thinking about true and false. Are they not the boolean equivalent of magic numbers? I think it would be a good idea to replace them all with constants.