3 ms·
I would be a bit surprised if this is true, because it implies that when you're writing code that will be formatted you do not think of the reader's experience.
by closed 6y ago
I would be a bit surprised if this is true, because it implies that when you're writing code that will be formatted you do not think of the reader's experience.
This could be the case if you have extreme confidence in the formatter, but I have def seen some very funky black outputs. It seems like when writing people will likely do so with a model of how black will yield the final code in mind. (Eg "if I add more characters to this one line list statement, it will get exploded across 5 lines", and affect readability, etc..)
- pmiller2 6y agoRather than “writing... with a model of how black will yield the final code in mind,” it’s more like “Oh, shit, Black made a real mess of this. Can I fix this without butchering the code?”
- closed 6y agoYeah--we're basically second-order black formatters now. Not writing code that looks nice, but writing code so a tool that writes code will make it look nice.
- pmiller2 6y agoNot really. At least that wasn't my intention to say that. Most of the time, I find Black does a Good Enough Job(tm) that I don't care to mess with it.
- VectorLock 6y agoFormatters don't have the understanding like the developers do. Certain changes that might increase the understandability for a human might get obliterated if they don't conform to the rules of the autoformatter.