4 ms·
Tab character vs spaces characters is the debate, not the manner in which they are inputted
by phist_mcgee 5y ago
Tab character vs spaces characters is the debate, not the manner in which they are inputted
- alias_neo 5y agoGot it thanks. I suspected as much but I thought it would be insanity to actually use the Space key. My opinion is that it is split based on role/platform. The first half a decade of my career I used tabs, the past half a decade of my career I have used spaces. The difference? First half I was an Android app developer (Java). Now I'm a backend developer (Golang). I also lead the time so I get to make the decision on what the team uses. Hopefully spaces is the right one :D
- masonj188 5y agoGofmt rewrites spaces to tabs
- professoretc 5y agoI'm not familiar with the standard Go coding style. Does it correctly handle the case mentioned above, where you have a function call like connect(option1, option2, option3); That is, will the spaces from the column `connect` starts in be preserved as spaces, or will they be converted to tabs?
- alias_neo 5y agoIndeed it does. Well there you go, I'm full of sh*t because having just checked a few of our Go projects, they're all Tab indented. My editors use tabs when editing Go files, and spaces for others. YAML for example uses spaces. I guess it's so well handled, and transparently so that I hadn't even realised. Also the spaces thing was a joke, I don't tell my team to uses spaces or tabs, I just tell them to follow the Go programming standards/guidelines when writing Go.