Re: list of mandatory hooks in file system module implementation

"AndrĂ© Braga" <[email protected]> Tue, 26 Aug 2008 00:07:23 -0300
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
On Mon, Aug 25, 2008 at 23:06, Ingo Weinhold <[email protected]> wrote:
> While "?" and ":" are not really independent operators, they are still styled
> that way (i.e. the line is broken before).

Oh well, it's an unspoken rule (or at least not at all clear on the
guidelines), and code using the ternary operator is not the most
common, so I didn't try looking for examples (didn't even cross my
mind, actually -- it's been ages since I needed a multiline regex and
I don't grok perl)...

Hence me styling them in the if-else manner (except that I
over-indented the : part, sorry), since that's what the ternary
operator means, after all (it's a decision operator, unlike the
bitwise, logical and list ones).

(The smiley effect when using them on a macro is just the icing on the cake ;))

This said... Sorry for the confusion =)

Anyway... Despite the fact that I don't quite agree with treating ":?"
differently than every other flow control constructs, I suggest
updating the coding guidelines so that this is made clear.

(BTW, I like the WebKit coding style document quite a lot -- can't we
adopt their format (for the document, not the styling rules, of
course)? See http://webkit.org/coding/coding-style.html)



Cheers,
A.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/