6 ms·
It actually does, 2 spaces indents are hard to read, period.
by apr 13y ago
It actually does, 2 spaces indents are hard to read, period.
- gryz 13y agoyou're getting used to it within few months.. (currently we have tabs though)
- sdoering 13y agoIs there any scientific/empirical proof on this? I indent 4 spaces, no tabs, but I would like to see the real rationale there, not just the PEP-8 "rules".
- Shish2k 13y agoZero spaces makes indentation harder to spot than infinity spaces. Infinity spaces gives less space for code than zero. Conclusion: use as wide an indentation as possible while still keeping enough space for the code itself.
- praptak 13y agoThere is this: "Program indentation and comprehensibility (1983) by R J Miara, J A Musselman, J A Navarro, B Shneiderman" http://www.cs.umd.edu/~ben/papers/Miara1983Program.pdf http://www.cs.umd.edu/~ben/papers/Miara1983Program.pdf I'd classify it as an attempt rather than something decisive but whatever floats your boat.
- damncabbage 13y agop866: The level of indentation that seems to produce optimal results in comprehension is between 2 and 4 spaces; as the number of spaces increase, the comprehension level decreases. On the other hand, the sample program hard parts that were indented nine times (!) in places. It's an interesting read, but I'd not try to use it in a discussion. Personally, I don't care; just pick one (hopefully one that matches what most people are using with that language, eg. 2 spaces for Ruby), and get on with it.
- praptak 13y agoYup, they seem to have used an overly indent-happy indentation scheme. Two separate indents: he 'begin' after the 'for' and for the block body is superfluous. This raises the concern that their results are biased towards smaller indents.
- valisystem 13y agoNo. Indent space is just an opinion/preference/habit.
- oftenwrong 13y agoI prefer 2 space indents (tabs)