On Wed, Sep 2, 2009 at 9:31 AM, Alexey Proskuryakov <[email protected]> wrote:

>
> 02.09.2009, в 8:40, David Levin написал(а):
>
> Use enums instead of bools for parameters.  The one exception is function
> names that start with "set" and take one parameter (e.g. setAllowHeaders).
>
> The purpose of this rule is to avoid having illegible function calls like
> doSomething(myData, true, 0, false, true). If a function is always called
> with a named variable, there is no practical reason to invent an enum for
> it.
>


Yes, this is a C/C++ rule.  I do Objective C so seldom that I didn't think
about that, but the guideline should mention that.



> *Indentation*
> Additional clauses in a conditional may be indented 4 extra spaces to
> visually separate them from the statement to be executed.
>
> Like this
>
> if (condition1        && condition2)
>     statement;
>
>
> It doesn't look like there's a prevailing style for this currently.
>

I've seen Darin Adler do this a few times.  I even unindented one instance
and got corrected before checkin, but perhaps this happens so seldom that it
isn't worth mentioning.
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to