3 ms·
Arguably it would be a problem for a coworker that wanted to use tabs. “We’ll just force everyone to do things one way” kind of ignores the point I was making.
by afavour 2y ago
Arguably it would be a problem for a coworker that wanted to use tabs.
“We’ll just force everyone to do things one way” kind of ignores the point I was making. It shouldn’t be necessary for you to care how anyone else formats their code, same as you don’t care what font their code displays in or what text editor they use. It feels like a vestigial aspect of programming that we have to concern ourselves with it in 2024.
- refulgentis 2y ago100%, way this felt in practice at Google was I could have whatever I wanted in my IDE, and it'd be transformed upon check-in into the house style, which I don't need to care about FWIW, just happy to have a chance to unload this thought finally: it had surprisingly little impact on code reviews, in that the "personal preference I need to enforce" just ascended abstraction levels.
- ukuina 2y agoDoes the IDE transform the existing code in the repo back into your preferred style on the next checkout?
- refulgentis 2y agoMaybe I cant remember right, but IIRC any IDE in use there (same ones as outside, there's nothing special) had a setting for tabs vs. spaces / indentation size And yes, that doesn't help you if ex. your style is a blank line following every code line. In practice, it works, I surmise because people are fine with someone else's code being in a different style, but they want to write in their style.
- eru 2y ago> Arguably it would be a problem for a coworker that wanted to use tabs. Wasn't a problem in practice. Just like we never had any problems with anyone wanting to use eg Pascal or so.