Another benefit to using the "static" keyword is that you can tell at a glance 
that the function is internal to the translation unit, while you may not notice 
the anonymous namespace.

-Sam

On Oct 19, 2011, at 3:45 PM, Darin Adler wrote:

> The guideline is not to disallow anonymous namespaces.
> 
> It’s to prefer “static” over anonymous namespaces when either one would work.
> 
> Debugging tools on at least some of the platforms work better with functions 
> that are given internal linkage by using the “static” keyword rather than 
> functions that are inside anonymous namespaces.
> 
> On the other hand, anonymous namespaces are a more powerful tool that can do 
> more than the “static” keyword can.
> 
>    -- Darin
> 
> _______________________________________________
> 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

Reply via email to