[U-Boot] use of C99

Timur Tabi timur at freescale.com
Wed Apr 8 23:38:55 CEST 2009


Wolfgang Denk wrote:

> Bear with an old man like me. I am used to the habit that variables
> get decleared at the begin of a block, not in the middle of it. When
> searching for the declaration of a variable, I find it a major PITA if
> I have to scan the whole source file instea dof just looking at the
> first few lines of a block.

This is why I use an advanced programmer's editor that brings me to the
definition of the variable under the cursor with a single keystroke.

> Not the compiler, but humans like me. I have just a small  window  of
> lines  I  can  really  focus  on,  and  the  smaller  a block of code
> (including the needed variable declarations), the easier  I  get  the
> impression I understand it.

In this case, it would be easier for you if the variable were declared
next to the code that uses it.

>> This is what we do today, and I think it's ugly.
> 
> It is ugly, but much less ugly than variable declarations right in the
> middle of 200 lines of code.

This is where I disagree.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the U-Boot mailing list