osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

on = style


On 09/10/17 08:46, Steve D'Aprano wrote:
> I truly believe that, with*very*  few exceptions (*ALL*  of which are some form
> of in-line data table, and even then only rarely) any programmer who worries
> about lining up assignments on different lines like this is just engaged in a
> time-wasting exercise to make themselves look busy while actually taking it
> easy. It is a pure avoidance activity.

I'm inclined to disagree, at least in as much as I think the exceptions 
are more common than you do.  For me at least there are two opposed 
principles:

* Columnar data is easier to read.
* Big gaps in the middle of a line make it hard to read.

I fairly often line up initialisers

   height  = 5
   width   = 10
   length  = 2
   density = 0.75

...or other related groups of assignments, but that takes a minute at 
most.  When there is a huge mismatch in name length, aligning the 
columns is more tedious and gives you less visual advantage, so I don't 
bother.  Somewhere in the middle is a tipping point.

-- 
Rhodri James *-* Kynesim Ltd