4 ms·
My google ability didn't see anything, but are their any case studies that show it's more readable? I'm happy to accept that it is, but I can't help wondering
by diob 5y ago
My google ability didn't see anything, but are their any case studies that show it's more readable? I'm happy to accept that it is, but I can't help wondering if research has been done or it's mostly gut feeling / anecdotes / aesthetics.
- andybak 5y ago> that show it's more readable? I'm not clear exactly what the "it" here refers to but as I mentioned in other comments it's fairly self-evident that indentation is easier to visually parse than braces. A simple thought experiment - would you find it easier to skim read code where the indentation was consistent with the bracing or where it was inconsistent? Your brain registers the indentation first and you only resort to counting braces if there's a reason to doubt the former.
- diob 5y agoReality often times runs counter to our expectations though, which is why I wondered if no brace methods have been shown to enable simpler to understand usage / understanding.
- andybak 5y agoMy point was that the debate is between "indentation alone is sufficient" and "braces plus indentation is better than just indentation". Nobody advocates for "braces are better without indentation". This surely implies that (practically) everyone agrees indentation is carrying most of the weight of visual indication of structure. Of course "everyone" might be wrong - but that's a fairly tricky corner to defend.
- egberts1 5y ago> Nobody advocates for "braces are better without indentation". ^^^ THIS ^^^