Earlier quoted context omitted.
COuld you elaborate a bit on what the benefit of the other representations in your example. I don't get it.
OK, I pulled colors as an example out of thin air but I'll see if I can make it work. Let's say you have to write a routine that does something based on a color as the input. You have a few choices in terms of how to represent the colors: - The name of the color in a string - A typdef enum for your colors (integers) - A color-per-bit scheme (U8, U16, U32) - Channel-per-bit scheme (U8) - 4 or 6 bit packed RGB values (…
The probably more important consideration is that with an enum, your compiler can catch misspellings. Depending on your runtime environment, this can be a huge killer advantage. In particular, if your runtime environment can't do much beyond blink an LED to report errors, compile-time checking is really really important.