[zeromq-dev] Proposal for 2.0.7: Cleaning up the ZMQ_* constants

Chris Wong chris at chriswongstudio.com
Fri Apr 16 03:48:35 CEST 2010

I agree with mato.  Let's bite the bullet now when it's still in beta rather than later.  Having consistent naming is more valuable than the extra savings in typing.

In Python/Ruby, you can always save typings by importing the nested constants.  With flat constants, you don't have that option.

+1 for cleaning up the prefix convention.


On Apr 15, 2010, at 5:42 PM, Martin Lucina wrote:

> ellisonbg at gmail.com said:
>> I am not too excited about this change as the current API is pretty
>> well established and the new convention simply makes all of use type
>> more.  But, I spend a lot of my time in the Python universe, where
>> "flat is better than nested." (I view the proposal as a sort for
>> pseudo=nesting).
> Flat is of course better, but doesn't work very well long-term in C where
> you have no concept of namespaces.
> Hence this proposal, the main motivation is to future-proof ourselves by
> not dumping every single constant into the ZMQ_ "namespace". Note that e.g.
> BSD socket APIs use similar schemes; SOCK_XXX, SO_XXX, TCP_XXX and so on.
> If others do not share my opinion that namespace pollution is a problem
> then we can of course ditch the idea.
> Cheers,
> -mato
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list