[zeromq-dev] HEADS UP: changes to Java binding public API
sustrik at 250bpm.com
Fri Apr 9 16:07:05 CEST 2010
gonzalo diethelm wrote:
> Now for the next step... As I mentioned before, there are now two ways
> to build 0MQ objects:
> ZMQ.Context c = new ZMQ.context(1, 1, ZMQ.POLL);
> ZMQ.Socket s = new ZMQ.Socket(c, ZMQ.PUB);
> ZMQ.Poller p = new ZMQ.Poller(c, 3);
> ZMQ.Context c = ZMQ.context(1, 1, ZMQ.POLL);
> ZMQ.Socket s = c.socket(ZMQ.PUB);
> ZMQ.Poller p = c.poller(3);
> For Context itself the difference is really minimal, but for Socket and
> Poller I think the "functional" way is much clearer.
> Question: should I get rid of any of these two ways? My personal vote is
> to make all constructors private (getting rid of the "constructors" way)
> and stick to a strictly "functional" public API.
There have been a discussion about this a while ago and the general
concensus was the same as yours.
More information about the zeromq-dev