Here are the reasons for this proposal:
blink
and WTF
namespaces.using WTF::Foo
in header files, which pollutes the global namespace. While this practice should stop, adding the WTF::
prefix to all call sites in Blink would be a significant effort. By merging WTF into the blink
namespace, we can mitigate the impact on existing code.Are there any comments on this proposal?
A relevant thread: https://groups.google.com/a/chromium.org/g/platform-architecture-dev/c/DU2xiGoTHOE/m/4AV1wmoYCwAJ
lgtmOn Wed, Jun 4, 2025, 2:45 AM Michael Lippautz <mlip...@chromium.org> wrote:lgtmAre you intending to keep the folder name there? One could argue that this could be e.g.platform/base. (Not suggesting that this needs to be done now though.)
On Wed, Jun 4, 2025 at 3:10 AM Kentaro Hara <har...@chromium.org> wrote:LGTM.(I have a question about the importance of the work but that's a separate question to be resolved in your team. Technically, no objection :-)
On Wed, Jun 4, 2025 at 10:05 AM TAMURA, Kent <tk...@chromium.org> wrote:Hi WTF owners and platform-architeture-dev@,I am proposing the removal of the "WTF" namespace and its merger into the "blink" namespace.Here are the reasons for this proposal:
- There is no significant advantage to distinguishing between the
blink
andWTF
namespaces.
Historically, the WTF namespace was created in WebKit to house common code between the JSC and WebCore namespaces. That is not the case in Chromium.- According to the Google C++ style guide, namespace names should be lowercase, so "WTF" would need to be changed regardless.
- Many WTF symbols are brought into the global namespace by
using WTF::Foo
in header files, which pollutes the global namespace. While this practice should stop, adding theWTF::
prefix to all call sites in Blink would be a significant effort. By merging WTF into theblink
namespace, we can mitigate the impact on existing code.Are there any comments on this proposal?
A relevant thread: https://groups.google.com/a/chromium.org/g/platform-architecture-dev/c/DU2xiGoTHOE/m/4AV1wmoYCwAJ
--TAMURA Kent
Software Engineer, Google--Kentaro Hara, Tokyo
--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAGH7WqE1N_zDzbkDLOtmr-4KvGhUimJWHfTKYo%3DP4MLp2kFoMw%40mail.gmail.com.
Btw, is anyone updating the Blink GC plugin? It has some hardcoded references to WTF:: types; we'll need to update those right?