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

Amusing, but I feel like that's a terrible way to think about return codes. No error vs. error number does not map cleanly to a boolean.


Any other interpretation of his program goes against decades of Unix convention. http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.htm...


Ehhh, "if" is a bit of a specialized case. In general programs don't map fully to true/false, just leave it as "error code".

It's not that we should use any other interpretation, it's that that interpretation is only mostly true. Don't overgeneralize lest you introduce mistakes.




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

Search: