@unknownuser said:
(http://forums.sketchucation.com/viewtopic.php?f)":2i409aa9]If you can choose, for example, a level of indentation in your source code editor (please don't choose two!) you have an option. If you are writing Python, four spacesis mandatory so you don't have an option.
...AND...
@unknownuser said:
(http://javascript.crockford.com/code.html)":2i409aa9]Indentation
The unit of indentation is four spaces. ...
I ask these questions, because neither Martin (code in general, Python specific,) nor Doug (Javascript specific,) give any reasons. [Obviously, the Python interpreter needed a specific indentation, by why was 4 chosen as opposed to 2, 3 etc? This discussion really is about what Ruby code indentation should be, but with a background of WHY predessesor languages chose certain indents.]
What's so special about 4 space identation ??
What makes it better than any other choice ??
Why (Martin,) should I stop using 2 space identation ??
I like it, it's quick to enter, it saves space, it is less likely for someone editing to be tempted to outdent a multi-nested block of code.
I must state that I absolutely HATE outdented code blocks, they cover the ident guidelines in code editors.
Would MY choice of identation matter, as SciTE, Notepad++ and any other good code editor can easily convert one identation setting to another ?? **
**(You may need to asign macrokey(s) in your editor, if you don't wish to go through menus or dialogs.)