What issues have you seen with regards to using tabs?
What issues have you seen with regards to using tabs?
Look here: https://github.com/clojure/clojure/blob/master/src/clj/cloju...
I want the bindings being declared within that let to line up with one another. the first one immediately follows "(let [" so I need the rest to be indented six characters past where the let was originally indented. Six, not N times whatever the tab width happens to be in whichever editor someone's looking at the code in. This is the problem with tabs.
Which is actually the problem gofmt solves.
The desire to express your individual preference through the way code is formatted is an issue not a feature.
The code may be read, maintained and handled by many other individuals during the life of the code, and gofmt is an attempt to provide an incredibly high degree of consistency in the way that the code is formatted to improve those things.
The Go way is simplicity, readability, maintainability.
Once you accept that consistency in formatting is important and a good thing to strive for, the only question is spaces vs tabs. But spaces is a highly opinionated option as the number of spaces used for indentation has to be uniform, whereas tabs allows for each individual to configure their editing tool to permit a degree of individual preference that does not sacrifice any of the consistency.
Tabs have the advantage, please configure your editor to suit your preference and not the code.
I can't come up with a particularly good reason for it, but I'm so used to spaces at this point that tabs feel very wrong.
If anyone else has a good explanation I'd love to hear it.
How does a team adopt a standard regarding line length if their code base uses tabs and the team members specify different tab widths in their editors?
In my experience, devs that prefer tabs over spaces have a tendency to be unconcerned about line lengths, and their lines of code can become annoyingly long.
For example, the most popular Go project at GitHub[1] is Docker. Docker's code base contains Go files with lines of code that are hundreds of columns wide.[2] Gross. ;-)
[1] https://github.com/search?l=Go&q=stars%3A%3E0&type=Repositor...
[2] https://github.com/dotcloud/docker/blob/master/api/client/co...
Simply having the editor expand tabs (to whatever people agreed on, usually 4 for C/C++ that I've seen) and save spaces, always, makes life simpler.
EDIT:
See Grandpa Zawinski's post on same: http://www.jwz.org/doc/tabs-vs-spaces.html