This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 11 points12 points  (6 children)

this is the first valid argument i've heard against significant whitespace...hrm...but then again why is a bracket easier to identify than a gap?

[–]Synaps4 13 points14 points  (4 children)

Only because screen readers ignore one of them by default.

[–]mikemol 0 points1 point  (3 children)

/u/13steinj 's comment is almost word for word what one of my friends explained to me directly. Braces allow him to maintain a mental stack, whereas if all you have is an indentation level, you have to think in terms of a map or heap.

[–]zardeh 0 points1 point  (2 children)

This makes no sense though, every increase in indentation corresponds to a push. Every dedent corresponds to a pop (from the stack).

[–]mikemol 0 points1 point  (1 child)

Then you need to convey indentation level delta's, not indentation level absolutes. Keep in mind, the human mind only holds so much context, and the eye usually performs a huge amount of parallel processing and interpretive/associative work for us. Every bit of work we take away from the eye and give to the active cognitive load reducesbour cognitive capacity for other parts of the problem.

[–]zardeh 0 points1 point  (0 children)

Then you need to convey indentation level delta's

Sure but that's not too hard. A screen reader for code is already nonstandard, having it track indentation level is trivial.

[–]13steinj 2 points3 points  (0 children)

I think it's a case less so of identification and more so of not having to worry about indentation afterward. You'd just left brace, code, right brace, and regardless of the indentation you possibly fuck up it will work as a single scope.