case/switch instead? Some compilers will warn then if you add a new field to the enum and don't add it to the case statement.