Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xigoi
3 months ago
|
parent
|
context
|
favorite
| on:
YAML: The Norway Problem (2022)
on/off also doesn’t make sense in many contexts, for example `isRegistered: on`.
qw
3 months ago
[–]
I often prefer enums over booleans for this. It seems more readable for most cases, and can be extended with new values.
This:
isRegistered: true
could be replaced with
accountStatus: "UNREGISTRED"
Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: