Rockbox mail archiveSubject: Re: code style - my take
Re: code style - my take
From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Sat, 22 Feb 2003 04:57:39 -0500
If you (/i.e/., the Rockbox developers as a group) want to maintain a style, that's all the justification necessary.
But I'm not sure that maintaining backwards compatibility with older gcc versions is that necessary -- it's not as if gcc is expensive or hard to find.
I'm suggesting C99 because it offers advantages over C89 (or so I assume; the Standard Committee members aren't exactly script kiddies).
And because, <sarcasm> like GW Bush </sarcasm>, I'm a "uniter not a divider": it seems C99 might satisfy some of those patch developers who want what it provides, while still maintaining strict and clear boundries that are clearly C and not C++ or proprietary extensions (ok, reading the Standard might not be easy, but it's pretty strict about what's defined and what's not).
Admittedly, I have a bias: I'm a C++ coder, and I've drunk the Kool-Aid about it being usable as a "better C".
Quoting Daniel Stenberg <daniel_at_haxx.se>:
> On Fri, 21 Feb 2003, TP Diffenbach wrote:
> > Of course, I don't know how well gcc supports C99. But adopting
> this the
> > C99 Standard might well make /de jure/ constructs that are
> laready /de
> > facto/ in Rockbox.
> C99 is very well adopted in recent GCC versions, but we don't want
> to require
> them. We want Rockbox to compile and build even with earlier
> versions. (Some
> of the C99 stuff was GCC extensions already before C99 was set.)
> Besides: code style, format, indentation, braces, variable names
> etc in
> Rockbox follow a general style. The style was set by Björn together
> with the
> original core people, and it has been followed by lots of people
> problems. The style is somewhat documented in docs/CONTRIBUTING.
> We use that style in Rockbox. Like it or not. Obey. Personally, I
> do not
> apply patches to Rockbox that don't follow the style. Either I
> refuse to
> apply them or I reformat them myself.
> Or else, you bring a VERY GOOD motivation why you cannot. And
> reasons like "I
> want it this way" is not very good.
> Daniel Stenberg -- http://rockbox.haxx.se/ --
-- Archos FM needs a Rockbox!Received on 2003-02-22