[Webkit-unassigned] [Bug 31618] "using" statement coding style guidelines need clarification
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 18 09:57:30 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=31618
Darin Adler <darin at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #43413|review? |review-
Flag| |
--- Comment #3 from Darin Adler <darin at apple.com> 2009-11-18 09:57:30 PST ---
(From update of attachment 43413)
> +<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.
> +<pre class="code">
> +// Vector.h
> +
> +namespace WTF {
> +
> +} // namespace WTF
> +
> +using namespace WTF;
> +
> +
> +// Quantifier.h
> +
> +namespace JSC {
> +
> +} // namespace JSC
> +
> +using JSC::Quantifier;
> +</pre>
This repeats the Right example inside the Wrong!
> <p>In order for your patch to be landed, it's necessary that it comply to the <a href="/coding/coding-style.html">code style guidelines</a>.
> -There are some older parts of the codebase that do not always follow these guidelines. If you come across code like this,
> +There are some older parts of the codebase that do not always follow
> +these guidelines. JavaScriptGlue is one example. If you come across code like this,
> it's generally best to clean it up to comply with the new guidelines.</p>
I don't think this is good. JavaScriptGlue is different. It's end-of-lifed
code, not just an older part of the codebase.
> <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?
--
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