Hacker News new | ask | show | jobs
by codr7 2359 days ago
Because I always end up switching on the return value, and switching on enums is a lot nicer than ints. Especially when there is no agreement on what values are returned, LT is mostly -1 but is often specified as simply less than zero.

When you have a finite set of cases, enum is just the right solution period. I have no idea why people still insist on using ints.