Search posts, tags, users, and pages
Great response, thanks for all the links! I think i'll check out some of those for sure!
Dart has a style guide and now also a formatter which makes your code compliant with the style guide, other languages I'm not sure if there's an official style guide, but some of the bigger players have created style guides which they usually post on GitHub. With Google, they use spaces for everything.
Dart Style Guide:
Java Style Guide:
C++ Style Guide:
JavaScript Style Guide
Python Style Guide:
CSS Style Guide:
HTML Style Guide:
Other: github.com/google/styleguide
True indeed. Because of my python background i always use 4 spaces. It's also useful when checking out code from someone else. From your experience, do other languages have something similar to PEP8?
Python I can understand why they need a fixed standard, they don't have curly braces to do block level operations, so your spaces are the blocks. I remember in Python 2 it was always a PITA when checking out code, then one person used 2 spaces, another used 4 spaces and another used tabs, then the code does't run because of the mixed spaces and tabs.
We use tabs in all our projects, except for Python scripts, just makes it easier, everyone can set how wide they want the indents to be.