Y
Hacker News
new
|
ask
|
show
|
jobs
by
wanderingstan
335 days ago
I concur. Same thing in many UI frameworks where you’ll have a Boolean “isHidden” to control visibility. Makes it so hard to reason about.
1 comments
Rexxar
335 days ago
IMHO, in this case it should not even be a boolean but an enum {Visible, Hidden}.
link
roguecoder
335 days ago
Even with working with an existing framework, we can define a constant `HIDDEN=true`
link