On Sun, Jun 13, 2010 at 12:46 AM, Maciej Stachowiak <m...@apple.com> wrote:

>
> On Jun 4, 2010, at 3:54 PM, Joe Mason wrote:
>
> > I'm strongly in favour of g_.  It seems weird and ugly to me to have
> > prefixes for some non-local scopes but not all.  And it's very helpful
> > to be able to look at a variable reference and immediately know that
> > it's a global, and not a local whose definition you skimmed over.
>
> I think file-scope static globals don't need a prefix. In the few cases of
> globals with extern linkage, I think a prefix would make them needlessly
> unpleasant to use. HTMLNames.h is one of the most prominent examples. I
> don't think we'd want to write g_divTag and g_widthAttr instead of divTag
> and widthAttr.
>

For what it's worth, I think having a special prefix has benefits beyond
conflicts when linking.  I agree 100% with what Joe said.

(That said: if there isn't a lot of support for this, I don't think anything
should change...but I figured I'd throw it out there in case others agreed.)

J
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to