Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Typedef rule

Re: Typedef rule

From: Björn Stenberg <bjorn_at_haxx.se>
Date: Mon, 2 Dec 2013 11:35:47 +0100

Thomas Martitz wrote:
> Therefore I propose that we relax the typedef rule and allow
> typedefs for integral types (only) when reasonable. This would
> basically be adopting the Linux kernel guideline w.r.t. to typedefs,

There are times when typedefs are useful, but they are in fact exceptions. I think rather than say we now allow typedefs via some complex set of rules, it is better to treat each typedef as an exception and document in a comment next to the declaration why this typedef is granted an exception. These exceptions can then be explained using the linux kernel guidelines.

> I'd like to trust our developers to weigh up what's reasonable.

That is a slippery assumption. The problem is not "our developers", i.e. those already experienced with Rockbox and know our history and rules. The problem is that "reasonable" has as many definitions as there are people, and even the most horribly obfuscating, code-hiding, typedef-abusing devlopers consider their approach "reasonable".

It is therefore important to be clear up front about what is accepted and not, to avoid people writing large patches in an unacceptable code style.

-- 
Björn

Received on 2013-12-02

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy