Remix.run Logo
lxe 4 days ago

> you could view the source however you wanted. Spaces vs. tabs didn't matter because neither affects the semantics and the editor on the system let you modify the program tree directly (known today as projectional editing).

But formatting still doesn't matter. Outside of whitespace-dependent languages, formatting is a subjective thing -- it's a people concern, not a computer concern. I can store my JavaScript as AST if I want to.

kmoser 4 days ago | parent [-]

There are annoying edge cases where formatting does matter, such as whitespace around HTML text nodes, e.g.:

  <span>foo</span>
vs:

  <span>
    foo
  </span>
grumbelbart2 4 days ago | parent [-]

Sure, but the same goes for verbatim strings, or leading whitespaces in python. "Code formatting" questions usually only concern themself with those degrees of freedom that do not alter the semantic meaning of the code.

kmoser 3 days ago | parent [-]

Agreed, but my experience is that many formatters will try to "help" by formatting non-code, thereby breaking something.