[Webkit-unassigned] [Bug 31618] "using" statement coding style guidelines need clarification

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 18 19:33:54 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31618





--- Comment #5 from Chris Jerdonek <chris.jerdonek at gmail.com>  2009-11-18 19:33:54 PST ---
(In reply to comment #3)
> (From update of attachment 43413 [details])
> > +<li>It is acceptable, however, to use "using" declarations at the end of 
> > +header files to include into the global scope one or more names in 
> > +the WTF namespace.
> 
> I would specifically call this out as an exception to the rule just for the WTF
> sub-library.

Sounds good.

> This repeats the Right example inside the Wrong!

The Wrong is actually slightly different -- including not just one name in the
WTF namespace but the entire WTF namespace (or is that okay?):

+<h4 class="right">Right:</h4>
+
+} // namespace WTF
+
+using WTF::Vector;

+<h4 class="wrong">Wrong:</h4>
+
+} // namespace WTF
+
+using namespace WTF;

> >  <dt>Follow the Coding Style Guidelines</dt>
> >  <dd>We welcome patches that clean up code to follow our coding style guidelines.
> > +However, cleanup should ordinarily take place only when you are already 
> > +touching a certain area of code.</dd>
> 
> I know this is what we discussed, but I think it's confusing rule. Can we do
> better?

I guess I need your help here.  I wrote this partly to gain clarification: is
it or is it not okay to submit patches that address only style?  The web site
seems to say (even encourage) yes, but Alexey and Mark's response to my request
above seems to say no.  I think it would be helpful for the site to be clearer
on this point.

(Personally, I was only planning to do this in cases where things can be
cleaned up with a script either globally or per-project, etc.  For example--

https://bugs.webkit.org/show_bug.cgi?id=31167

This seems more efficient than having everyone do a little bit at a time. 
Also, in some cases it helps to have the style patches separated from the
functional patches anyways.)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list