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

It could be an argument for using automatic formatting (not only automatic indentation while typing, but reindentation of the whole code before compile for ex.)


But if you did that, then you would lose contextual information about that sort of bug, especially if you weren't looking at it when compiling. So instead of seeing two lines of code indented after an if (i.e. the mistake), you'd just see the one line if printing a debugging statement and the next line would be indented at the same level as the if.

To my mind that's worse because you lose meaning when doing the auto formatting. Better to just give a warning instead, this also goes for while and for statements.




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

Search: