[Xcb] naming convention (finished)

Ian Osgood iano at quirkster.com
Wed Sep 20 07:55:17 PDT 2006

Hash: SHA1

On Sep 20, 2006, at 1:09 AM, Jamey Sharp wrote:

> On Wed, Sep 20, 2006 at 12:21:17AM -0700, Keith Packard wrote:
>> On Wed, 2006-09-20 at 08:35 +0200, Vincent Torri wrote:
>>> So I would vote
>>> for xcb_ in all the exported functions in xcb.h, and x_ for all the
>>> functions in the protocol.
>> ACK! Please don't mix them. Pick one and stick with it. The  
>> separation
>> isn't useful for users, and will only serve to force them to  
>> constantly
>> refer to the docs to check which prefix is needed for each function.
>> I'd love to use x_, and I don't know of a package already using it  
>> for
>> function and type names. But, xcb_ would be safer.

(Whereas XCB has already been confused with X Cut Buffers... ;)

> If people want me to give a decision on this one, I guess I'm inclined
> to listen to Keith, despite finding Bernardo, Ian, Bart, and  
> Vincent all
> convincing. And since I think the extra two characters won't hurt
> anyone, let's go with the full xcb_ prefix everywhere.
> Though Keith, I don't think the mixed approach would require  
> looking at
> documentation. The twenty-some functions that would have the xcb_  
> prefix
> are all clearly special, as none of them are pure protocol- 
> encapsulation
> stubs.
> --Jamey

Another drawback: what prefix would we use for the utilities in  
xcb_utils? Some are thin convenience wrappers for generated protocol  
and would make sense to have the "x_" prefix, whereas others are  
utilities having nothing to do with the protocol, or encapsulating  
larger chunks of protocol.

Version: GnuPG v1.4.1 (Darwin)


More information about the Xcb mailing list