Compiler Errors for Humans

I agree: the Unix philosophy of using plain text for communication is very brittle in the face of changes. Instead tools should parse structured output, and this structured output should:

  • be versioned; with the version number being a mandatory compiler argument when structured output is requested
  • guarantee backward compatibility within a given version (no removing fields, no changing fields format, but allowed to add new fields)

Interestingly, the structured format might well be less verbose than regular output because it would not need to quote the source; just having the source range is sufficient for a tool to go and fetch it after all.

1 Like