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

The traditional third value is actually FileNotFound: https://thedailywtf.com/articles/what_is_truth_0x3f_

but in Haskell, yes, it's undefined. Which isn't a real value! For example, infinite loops are undefined. Theorists like to call it a value of every type, but in practical terms, it's more like a computation that never produces a value. The builtin "undefined" can be written as an infinite loop ("undefined = undefined") and many other pure infinite loops can also act as undefined values. The runtime is able to catch some and crash instead of hanging, but not others.



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

Search: