Hacker News new | past | comments | ask | show | jobs | submit login

I mostly follow the official one on Scala. I deviate from it a little to help me stay sane when switching between languages like 4 spaces tabbing and sticking to K&R style[1] for indentation/braces. Using an IDE like Intellij or Eclipse can also help reinforce consistency as well since you can set the way it formats for you (and also have it auto-format before you commit to git).

Most important thing is to just stay consistent with whatever you decide upon more than which formal style you choose. If I were working in a team with Scala, then I would stick with a formal spec (or just let the IDE auto-format for me to adhere to the team's style when committing).

[1] http://en.wikipedia.org/wiki/Indent_style#K.26R_style




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

Search: