You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1997/07/17 10:29:48 UTC

Re: [POLL] style-guide changes as of 1997-07-16 13H11 EDT

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