[zeromq-dev] ZeroMQ contribution policy - style guide

john skaller skaller at users.sourceforge.net
Sat Feb 4 02:30:18 CET 2012

I have just added a new section to the style guide "banning" the calling
of public functions by public functions. Public functions are reserved
for the public.

Now, in the 0MQ C API binding,  there are some cases where zmq_send/recv
functions call the C API of the msg_t objects.

This may be permissible in that the socket I/O functions can be viewed
as clients of the msg_t objects. I'm not sure.

However this leads to a question:  to make it clear that this is permissible,
if indeed it is, it is necessary to clearly separate the msg API from the 
socket API.

Normally this would be done by using separate header files.
However there is another common way to do it: by using 
a strongly visible horizontal line such as:


or like this:

// socket API

if there's a heading.

The question is: what is the style guide for such separators?
If not to be used at all, what is the right way to clearly partition
function sets, where the structure of the API indicates such a
partition exists?

[There's a good reason not to split the C API into separate header files]

john skaller
skaller at users.sourceforge.net

More information about the zeromq-dev mailing list