Hacker News new | ask | show | jobs
by scuderiaseb 298 days ago
Depends, if you're absolutely sure whatever you have has just two states. Then by all means, use a boolean. But booleans are harder to read than enum values and you're skipping that because of saving a few bytes on the DB?

This is not premature optimization, sometimes booleans can be extremely hard to change so it's not as easy as "just refactor".