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

I don't remember all the rules, but I do remember that comparisons come before logical operations. It just doens't make sense to let a < b && c mean a < (b && c).

Perhaps an IDE/editor feature that removed unnecessary parenthesis could clean up code and you'd learn the precedence as you go.



IntelliJ IDEA has intentions to "add clarifying parentheses" and "remove unnecessary parentheses".

http://www.jetbrains.com/idea/documentation/intentions.jsp


That's an interesting list. A lot of automatic code simplifications that I want :)




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

Search: