You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The matter of whitespace is a religious one in many software development circles. It starts more arguments than the question of "What's the best text editor?" (link to text editor page)
While there are many different types of whitespace which matter to people in software development, one of the most contentious points is that of the number of spaces in a tab stop (link to tab stop definition). The most common number of spaces are 2, 4, and 8. Most projects will choose one of these and use it consistently in all files. This allows for continuity in the flow of the code, making it considerably easier to read. For instance, this:
Example of code using consistent tabstop size
Is much easier for a programmer to read than this:
Same code sample but with differing sizes of tab stops
Before you start working with a project's code, check the (link to coding standards) coding standards (if it exists), the wiki, new contributor documentation. If you don't find something telling you about the preferred number of spaces in a tab stop, ask someone (link to where to ask). If you don't do your homework to learn the preferred number of spaces to use in a tab for that project, then use the wrong number of spaces and commit the code, you may get off on the wrong foot and annoy other members of the project community.
Question of whether to use spaces or tab characters
No description provided.
The text was updated successfully, but these errors were encountered: