Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@linuxer4fun Indentation is additional spaces at the beginning of a line to visually show program structure.
Two important points.
It should be rigidly consistent, e.g. If you use 4-space indentation then a block that is on the third nesting level should have exactly 12 spaces before the start of a statement.
(Studies show that indentation should be between 2 and 4 spaces to be optimal).
Secondly, it should be kept to a minimum.
Deep nesting is a sign there may be something wrong with the design of the program.
A related point is the recommendation to keep your line lengths with a maximum length of 80 characters. You can't do this cleanly if your indentation is too great. -
@linuxer4fun I set TAB to emit 4 spaces. The problem with TABs is that they don't align nicely with spaces when people have different settings.
They're also typically 8 chars wide which is far too many.
Im argueing with my friend if this is legacy or not. Please reply
undefined