[coreboot] [flashrom][PATCH] invalid local variable declaration
libv at skynet.be
Tue Jun 23 15:13:50 CEST 2009
On Tue, Jun 23, 2009 at 01:51:21PM +0200, Stefan Reinauer wrote:
> Hi, Luc,
> I agree we should set standards as low as possible, and try to make it
> easier for people to write good code, but..
> On 23.06.2009 13:39 Uhr, Luc Verhaegen wrote:
> > I personally dislike this, as it is only done to make it easier for
> > people to be lazy.
> Or to make the code more compact and easier to read.
I believe that this one can go both ways. People can argue these both
points from either side.
> > By being forced to declare variables at the beginning of blocks, people
> > are pushed towards creating smaller blocks and therefor expose natural
> > deliniations quicker.
> While you may be right for many cases, I don't believe that cutting
> features of a programming language automatically makes people write
> better code. If it were, we'd all be writing firmware in Forth. ;-)
This is one of those things that i believe are not a feature, and is
just something that c++ developers got used to and then claim they
missed when they were back in the C world for a bit.
> > Just because the compiler can handle it doesn't mean that you should
> > write less good code than you could.
> Just because the compiler allows you to declare variables inline does
> not mean that you should create bigger code blocks or write worse code.
It is something that cannot be stopped. It is human nature and it will
always happen. Not everybody is always as nitpicky when writing or
More information about the coreboot