News for hackers. Stuff that matters.
Re:Ask HN: Do You Use Enum for Yes, No, Unset? by dvh on Friday June 17, 2022 @04:34PM (#31783958)
I use integer surrogate keys everywhere. So 1 yes, 2 no, 3 unset, 4 yes but no every other Friday, 5 use this option for customer x, 6 no with notes, 7 zebra, 8...
Re:Ask HN: Do You Use Enum for Yes, No, Unset? by Volundr on Friday June 17, 2022 @05:12PM (#31784432)
I'm pretty sure I've worked on this codebase...
Re:Ask HN: Do You Use Enum for Yes, No, Unset? by marginalia_nu on Friday June 17, 2022 @05:15PM (#31784472)
With some 4.2 billion integers to choose from, you can pretty much put everything in one enum. Genius!