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

The endless fights about whitspaces seem so ridiculous to me. The points made by both camps are entirely valid (I prefer adding whitespace to layout blocks of functionality), but it feels like this should be something that an IDE should take care of. There should be the least amount of whitespace-changes in the VCS as possible, and the IDE should present the code how the programmer wants it to see instead. Similarly, questions such as curly brace placement and whitespaces between operators could be dealt with.


That is how my company works, everything is automatically formatted before commit, there are no debates. That's how languages like Rust and Go (and JavaScript/TypeScript via Prettier) have ended up also.

Same with lints, set up a company-wide lint configuration, apply it automatically, auto fix if possible.




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

Search: