Hacker News new | ask | show | jobs
by wahern 2546 days ago
But that style elides the distinction between syntax and semantics by making indentation a function of the number of letters in an identifier. The above code isn't indenting so much as typesetting--aligning visual elements, not grouping semantic components such as compound statements. If you're typesetting and the only thing you can rely on is monospace fonts, then of course you must use spaces. That's reflected in the rule, "tabs for indentation, spaces for alignment."[1]

The lack of convenient semantic cues in the source file representation is exactly what burdens the visually impaired disproportionately. The well-sighted don't need a specialized parser and formatter for a language as a prerequisite to reasonably comfortably reading and editing because visual alignment suffices. The history of teletypes and keyboards made tabbed indentation an accidental equalizer when it came to source code editing. The well-sighted needed to willfully change convention to discard that benefit, and did so for highly dubious reasons.

[1] Which arose out of the tabs v spaces debate as a principled compromise and is not itself a historical style, AFAIK.