[zeromq-dev] conventions in bindings

Pieter Hintjens ph at imatix.com
Fri Feb 3 11:40:14 CET 2012


On Fri, Feb 3, 2012 at 11:20 AM, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote:

> I found this one a bit worrying, and if I've read the thread
> correctly, Pieter didn't respond to it (though Martin S. responded he
> thought it was a bad idea).
>
> Can we have this reverted or standardized across bindings? It seems
> like a rather import thing to make consistent.

I'd suggested this ages ago for the core API since it is a systematic
cause for confusion for new users. You create a SUB socket and connect
it, and it does nothing. Martin's argument was based iirc on
implementation aspects. Since all subscriptions are additive, you
should start with "nothing", not "everything".

To some extent this disagreement (ease of use vs. technical arguments)
was resolved by allowing high-level bindings to act as applications
expect, and keep the low-level binding as-is.

I'd documented this and other similar "fixes" when I started CZMQ.
It'd be great to follow through and as you suggest, get consistency
throughout all bindings.

TBH I'd prefer that libzmq just acted less eccentrically in certain
cases. A lot of CZMQ was just to compensate for weirdness in libzmq
that I could not patch or argue out.

Perhaps if the binding authors can agree on consistent high-level
semantics we can all aim at, over time these can be pushed down to
libzmq as well.

As Benjamin suggested, an excellent topic for the Portland meetup.

-Pieter



More information about the zeromq-dev mailing list