One thing is that the compiler can warn about missing cases when using enums (GCC optionally does this); with defines, it's not clear that several values form a closed set.
The other thing is that function signatures can now show 'enum myenum e' instead of 'int v', which is much clearer.
> One thing is that the compiler can warn about missing cases when using enums (GCC optionally does this); with defines, it's not clear that several values form a closed set.
But here, the values /don't/ form a closed set, and using enums would imply that they do.
The other thing is that function signatures can now show 'enum myenum e' instead of 'int v', which is much clearer.