[webkit-dev] Proposal to change nested namespace indentation rule to match the existing code

Kimmo Kinnunen kkinnunen at apple.com
Fri Oct 22 00:33:50 PDT 2021


Hello,
I’d like to propose changing the WebKit coding standard regarding indentation of nested namespace contents. 

The change would be to not add indentation for nested namespace contents.

This would be to:
1) Match what seems to already be de-facto used in code.
2) Subjectively simplify the rules. For me personally "never indent” is simple to understand.
3) Subjectively no downsides. For me personally indenting contents of nested namespaces does not seem to gain readability and does not seem to reduce bugs.
4) Subjectively side-step the issue of what the style guide means. I don’t personally understand what "and any nested namespaces with the same scope” means.


The change:
https://bugs.webkit.org/show_bug.cgi?id=232073 <https://bugs.webkit.org/show_bug.cgi?id=232073>

Current guide:
https://webkit.org/code-style-guidelines/#indentation <https://webkit.org/code-style-guidelines/#indentation>

Please comment if you feel strongly about this.

Now:

namespace WebCore {
namespace Nested {
   struct NestedPayload {
   };
}
struct WebCorePayload {
};
}


After:

namespace WebCore {
namespace Nested {
struct NestedPayload {
};
}
struct WebCorePayload {
};
}

Br,
Kimmo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20211022/dbc6da2c/attachment.htm>


More information about the webkit-dev mailing list