httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ics.uci.edu>
Subject Re: [POLL] style-guide changes as of 1997-07-16 13H11 EDT
Date Thu, 17 Jul 1997 08:29:48 GMT
In general, it isn't worth voting on style questions that are not
represented as options for indent; it means that such a style is
too weird to have been considered by other projects.  

>    1. Conventions for casting syntax:
>
>       a) "(char *)foo"
>          +1: Alexei, Dean, Ben, Jim, Randy

+1 [this is a standard convention for type casting]

>    2. Conventions for Boolean negation syntax:
>
>       a) "!expression"
>          +1: Alexei, Jim, Dean

+1 [it is a unary operator]

>    3. Conventions for simple if, while, and for blocks:
>
>       a) if (exp) statement;
>          +1: 
>
>       b) if (exp)
>              statement;
>          +1: Ben (implicitly from [4]), Jim
>
>       c) if (exp) {
>              statement;
>          }
>          +1: Ken (always), Dean (always)

It depends on the context as to which is more readable.  indent
will enforce (b).

>    4. Conventions for simple else-if blocks:

We already decided this issue.

>    5. Conventions for wrapping long (>80 column) routine
>       definitions/invocations:
>
>       a) foo_func (a, b,
>                    c, d)
>          +1: Jim, Dean

+1 [we already decided this one too]

>    6. Conventions for wrapping long expressions:
>
>       b) if (a &&                  # wrap only when you have to,
>              (b || c) && d) {      # operators wherever
>          +1: Jim
>
>       c) if (a                     # wrap only when you have to,
>              && (b || c) && d) {   # operators at bol
>          +1: Dean (with minor reservations), Randy

+1 on b) or c), depending on context.

....Roy

Mime
View raw message