4 ms·
This is one thing I do too, and what really bugged me when I first tried Go. As an example I will align equals signs like this: loggedIn = foo isAdmin
by lucaspiller 11y ago
This is one thing I do too, and what really bugged me when I first tried Go. As an example I will align equals signs like this:
loggedIn = foo
isAdmin = bar
It doesn't look like much, but when you are glancing over code it really helps to quickly read it.
- xentronium 11y agoAnd then you add `isCurrentlyAllowedToReadPosts = baz` and all your nifty formatting breaks.
- firethief 11y agoThis. I can't stand formatting conventions that cause a change to needlessly spill over into the neighbouring lines of a git-blame or diff. It might look good in the 2 dimensions here and now but history is important, and extra lines touched make it harder to follow.