3 ms·
This: > "Any proposal that requires everyone to just is not a solution, because everyone will not just" invalidates this: > A real solution is to have the te
by The_Colonel 2y ago
This:
> "Any proposal that requires everyone to just is not a solution, because everyone will not just"
invalidates this:
> A real solution is to have the team agree on a shared style guide, then enforce it with a linter and formatter.
... since the "team" is everyone. It's basically the same problem.
The other issue is that linters/formatters don't "solve" all formatting/stylistic choices. Most formatters, fortunately, still allow you to choose where you do line breaks for example, since they do matter and shouldn't be arbitrary.
- wnoise 2y agoYou're not wrong. But in theory, agreement and buy-in is a one-time thing, while actually writing the code and reviewing the PRs are constant things.
- The_Colonel 2y agoYes, but aligning the team culture is in theory also a one-time thing. And this is IMHO necessary in any case, no matter if you decide to enforce this alignment using auto-formatters or not.
- bluefirebrand 2y agoThey aren't the same at all A shared style guide is an external impetus to adjust behavior. It comes with external accountability, and also an implicit understanding that violating the shared expectation may bring consequences "Everyone should just be less anal" is expecting an internal impetus to adjust behavior. There no external accountability, and there's no expectation that failing to do so has consequences > The other issue is that linters/formatters don't "solve" all formatting/stylistic choices. 80% of a solution is better than 0%
- The_Colonel 2y agoThe point where this is the same is "everyone just needs to agree on a common style". > 80% of a solution is better than 0% I'm not sure if it's 80% or rather 20%, I guess it's a POV / arbitrary number. In any case, this is far from a solved problem, while I often see in these type of discussions the idea that auto-formatters solve formatting/code style problem. "Just use black" while dismissing the idea that the rest has to be tackled informally / culturally.