Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

0 shouldn't be false. 0 compared to something can be false. Null isn't false. Null compared to something can be false.

The entire concept of "falsey" makes my teeth ache.

Non-boolean expressions in a boolean context is asking for a runtime error.



> Non-boolean expressions in a boolean context is asking for a runtime error.

And yet, it doesn't, in strongly-typed languages that define which values are "false" and "true" for types such as strings, sets, dictionaries, and yes, even numbers.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: