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

0 if the bottle is empty.

1 if its hot.

-1 when its cold :D




Ah yes the triple-boolean


Reminds me of our five value boolean we used to have: is_deleted. Woe to person who expected that to be 1 or 0. Five distinct and overloaded values were possible, though I now forget them. Probably something like pending, fully deleted, being restored, not deleted, and restored.


like linux app return codes.


A ternary logic computer to go with it: https://en.wikipedia.org/wiki/Setun


FileNotFound if it's none of those


As reported in the famous Daily WTF post:

https://thedailywtf.com/articles/What_Is_Truth_0x3f_




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

Search: