Hacker News new | ask | show | jobs
by KuhlMensch 1614 days ago
I don't know if you are correct, but this is closest to how I think about it

Mechanically, a const dictionary, or a string union might achieve the same.

But semantically, an enum (sometimes) reads better.