5 ms·
IMO the solution is to have the formatter provided by the compiler/CLI/LanguageServer. rustfmt, go fmt, terraform fmt, etc. And then the language authors are in
by OJFord 3y ago
IMO the solution is to have the formatter provided by the compiler/CLI/LanguageServer. rustfmt, go fmt, terraform fmt, etc. And then the language authors are in charge of how it's supposed to be formatted too, and they should try to make that formatter 'strict' (IMO) in the sense of not allowing (accepting as input and outputting unchanged) two semantically equivalent styles. Don't leave it to third parties to fight over becoming the de facto style du jour. Don't be python, and certainly not javascript.
- shadowgovt 3y agoLanguage-provided formatters immediately end so many conversations about "correct" formatting that I consider them a requirement for a mature (read: "Would use in production on a project people are paying money for the success of") language these days, along with things like "IDE support," "static typing and/or sanitization analysis," and "a usable debugger."