[webkit-dev] Coding Style: Clarify some cases with spacing

2009-07-21 Thread Kenneth Christiansen
Hi there,

In bug 27499 (https://bugs.webkit.org/show_bug.cgi?id=27499) it was
pointed out that the coding style guide doesn't clarify whether it is
allowed to place a space before a comma or semicolon in a control
condition or in functions.

Thus asking the question whether the three following code snippets are
should be discouraged by the coding style guide or not:

for (int i = 0 ; i  10 ; i++)
doSomething();


// Qt's foreach
foreach (QString item , items)
doSomething();

f(a , b);

Personally I would opt for discouraging this, which David Levin points
out to be more or less the current project style.

If we can agree on this, I can patch the coding style guide.

Cheers,
Kenneth
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Coding Style: Clarify some cases with spacing

2009-07-21 Thread Sam Weinig
I believe it is quite well established that a space should not be allowed
before a ; or , in such circumstances.  (I have r-ed for it even ;) ).  I
think we should definitely explicitly call this out in the
guidelines if it is not already.
-Sam

On Tue, Jul 21, 2009 at 4:05 PM, Kenneth Christiansen 
kenneth.christian...@openbossa.org wrote:

 Hi there,

 In bug 27499 (https://bugs.webkit.org/show_bug.cgi?id=27499) it was
 pointed out that the coding style guide doesn't clarify whether it is
 allowed to place a space before a comma or semicolon in a control
 condition or in functions.

 Thus asking the question whether the three following code snippets are
 should be discouraged by the coding style guide or not:

 for (int i = 0 ; i  10 ; i++)
doSomething();


 // Qt's foreach
 foreach (QString item , items)
doSomething();

 f(a , b);

 Personally I would opt for discouraging this, which David Levin points
 out to be more or less the current project style.

 If we can agree on this, I can patch the coding style guide.

 Cheers,
 Kenneth
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Coding Style: Clarify some cases with spacing

2009-07-21 Thread Maciej Stachowiak


On Jul 21, 2009, at 6:56 PM, Sam Weinig wrote:

I believe it is quite well established that a space should not be  
allowed before a ; or , in such circumstances.  (I have r-ed for it  
even ;) ).  I think we should definitely explicitly call this out in  
the guidelines if it is not already.


The examples in the coding style guidelines use the right style (i.e.  
no space before the comma or semicolon), it would be fine to make it  
an explicit rule.


 - Maciej



-Sam

On Tue, Jul 21, 2009 at 4:05 PM, Kenneth Christiansen kenneth.christian...@openbossa.org 
 wrote:

Hi there,

In bug 27499 (https://bugs.webkit.org/show_bug.cgi?id=27499) it was
pointed out that the coding style guide doesn't clarify whether it is
allowed to place a space before a comma or semicolon in a control
condition or in functions.

Thus asking the question whether the three following code snippets are
should be discouraged by the coding style guide or not:

for (int i = 0 ; i  10 ; i++)
   doSomething();


// Qt's foreach
foreach (QString item , items)
   doSomething();

f(a , b);

Personally I would opt for discouraging this, which David Levin points
out to be more or less the current project style.

If we can agree on this, I can patch the coding style guide.

Cheers,
Kenneth
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev