From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Wed, 08 Apr 2009 16:38:55 -0500 Subject: [U-Boot] use of C99 In-Reply-To: <20090408213412.4754B8560EFB@gemini.denx.de> References: <4A0B9AAA-4714-4C27-84A7-22FCE4D91DDA@freescale.com> <20090408192832.8D48F8560EFB@gemini.denx.de> <49DCFF1D.6080006@ge.com> <20090408213412.4754B8560EFB@gemini.denx.de> Message-ID: <49DD196F.20204@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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