В Пнд, 20/09/2010 в 04:53 +0200, Arfrever Frehtes Taifersar Arahesis
пишет:
> > while you're in the process of cleaning things up, i know we dont have a 
> > rule 
> > anywhere in terms of line length, but python.eclass has always struck me as 
> > a 
> > file with incredibly excessive line length.  comparing to other eclasses, 
> > it 
> > has multiple lines in it longer than any single line in any other eclass.
> > 
> > i normally develop in a terminal with 170 cols (which i think is larger 
> > than 
> > average), so i'm pretty lenient, but even python.eclass exceeds that 
> > multiple 
> > times if not running close to it.
> 
> python.eclass has many nested checks, loops etc.

Although we don't write ebuilds in C there are useful bits in
/usr/src/linux/Documentation/CodingStyle:

1. Coding style is all about readability and maintainability using
commonly available tools.

2. Now, some people will claim that having 8-character indentations
makes the code move too far to the right, and makes it hard to read on a
80-character terminal screen. The answer to that is that if you need
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.


In other words having many nested checks means that eclass needs
reorganization to avoid them.

-- 
Peter.


Reply via email to