To align or not to align?

Problem

Ever wondered which code style is better?

DataBlocksCacheSize      uint64
DataBlocksCacheSizeBytes uint64
DataBlocksCacheRequests  uint64
DataBlocksCacheMisses    uint64

or

DataBlocksCacheSize uint64
DataBlocksCacheSizeBytes uint64
DataBlocksCacheRequests uint64
DataBlocksCacheMisses uint64

The first one is more readable: easy to see all the lines of one type. On the other hand, the second is better for diff, because all the lines need to be changed when adding a longer value or removing the current-longest.

Solution

Why not both? When we’re talking about style preference – let the code editor do the styling for you. You should be able to configure your code editor to show the code as the first style, even if it’s written as the second one.