On Jul 1, 2008, at 10:39 AM, Paul Pedriana wrote:
IMO in an ideal world ASSERT would have a unique prefix (e.g. WTF_) in order to guarantee collision avoidance as WebKit is ported to different platforms and different usage. I can see a number of other places in WebKit where this practice is already done (e.g. WEBKIT_VIDEO_SINK, KJS_FAST_CALL, etc.). This is of course similar to the reason we use C++ namespaces to help avoid code collisions.
For macros used in public headers, we definitely need a unique prefix. For macros used entirely inside WebKit, I don't think it's necessarily the best practice. But I'm open to the possibility. The C++ namespace issue is a bit different. Function names can conflict at link time in ways that macro names can't, so even functions that are not part of public interface can conflict. -- Darin