Hacker News new | ask | show | jobs
by wuster 5220 days ago
[ Edit: add more context ]

My use case for this is to map between the database and application logic.

In the example, the short string 'N' is for storage in a db column, *.NEW is for use in code, and "New" is for use to display in an UI. You don't necessarily want to persist the display or var name because you may want to rename them in the app later. IMO it's a bad idea to store display representations as data.