2 ms·
> This gives the false impression that the variables are all related. If they are related, they should probably be encapsulated in some kind of structure. The
by MaulingMonkey 10y ago
> This gives the false impression that the variables are all related. If they are related, they should probably be encapsulated in some kind of structure.
The true impression. If they're actually unrelated, they're more likely to be in different files outright, than immediately sequential. "Encapsulating" in a struct is pointless/potentially obfuscatory if they're related local temps - but I'll use the same style for initializing structs.
> And once you add the comments explaining what the first three variables are and how they should be used, and the comment explaining why pi doesn't have a decimal point, there is no benefit to alignment.
I align those comments too.
> If you add another long line, you have to realign the whole list
The one drawback.