Typesmart Objective C Enums
05/04/10 10:30 Filed in: Programming
In Objective C you can use standard enums just like you can from C, but it would be nice if there was a more object-oriented way to deal with them. Here's an approach that:
- Is an object
- Type safe and flexible (but not truly extensible via subclassing)
- Non fragile
- Trivial to log
- Can be compared using “==”
- Provide namespace support