[zeromq-dev] 0MQ 3.0 - API improvements
Pieter Hintjens
ph at imatix.com
Fri Apr 8 12:53:50 CEST 2011
On Fri, Apr 8, 2011 at 10:36 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
> On 04/08/2011 09:35 AM, Pieter Hintjens wrote:
>
>> Is there any specific reason for not wanting to use proper types for
>> these? The use of void * seems to go against all best practice in C.
>> I'm not sure it makes sense in C++ either.
>
> POSIX compatibility. Run-time checking (ENOTSOCK) instead of compile-time
> checking.
Sorry, I still don't understand, Martin. POSIX compatibility would
mean integer sockets, and no context at all.
void *context doesn't give you POSIX compatibility. void *socket
doesn't either. Run-time checking is fair on integer sockets, but I
don't see how you use that as a *reason* to provide what is basically
an untyped API for these two objects.
Could you be more explanatory please?
-Pieter
More information about the zeromq-dev
mailing list