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

In rule 5 (about assertions), why the comparison to true? Why is "if (<boolean expression> == true)" preferable to "if (<boolean expresson>)"?


I assume it's a habit to make sure you communicate to the type checker: "I expect this expression to be boolean".




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

Search: