2 ms·
> They are both correct, but have different semantic meaning. Exactly > it simply has to infer the semantic meaning of both, which is How exactly do you want
by dmitriid 4y ago
> They are both correct, but have different semantic meaning.
Exactly
> it simply has to infer the semantic meaning of both, which is
How exactly do you want the parser for the formatter to "infer semantic meaning"? It has no knowledge of the human requirements for this code. To the parser both are valid
> Both programs should be expressible in any language hence I don't see why you are placing the onus on the compiler to tell you one is incorrect.
Are we talking about "expressible in any language"? No.
Here's what I wrote: "Formatters will no save you from the many, many, many cases where indentation is simply ambiguous" in the context of formatters.