Hacker News new | past | comments | ask | show | jobs | submit login

Sometimes, it is not related to performance loss, it is related to implementation cleanness and complexity.



A separate `select` with empty `default` is about as simple and clean as it gets. It is easy to read, easy to reason about, and, most importantly, conveys the intention of the code perfectly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: