[zeromq-dev] STREAM_UPSTREAM/DOWNSTREAM confusing?

Matt Weinstein matt_weinstein at yahoo.com
Fri Jun 11 21:30:57 CEST 2010


It's a noble effort :-)

For the sake of readability, especially for a mixed-experience  
development group, I'm in favor of defining patterns and associated  
objects with expressive, easily read names:

	ZMQ_BUTTERFLY_CLIENT

otherwise you're creating your own learning trap and arcane pattern  
names.   Non-native speakers may also have a problem as well.

The txt generation can always do this

// OMG those defs r so unl33t!
#define	ZMQ_8F_CL1	ZMQ_BUTTERFLY_CLIENT

And copy/paste is always available...

Best,
Matt

On Jun 11, 2010, at 3:06 PM, Pieter Hintjens wrote:

> Have a look at http://www.zeromq.org/draft:explicit-patterns, see  
> what you think.
>
> -Pieter
>
> Sent from my Android mobile phone.
>
>
>> On Jun 11, 2010 6:11 PM, "Matt Weinstein" <mattweinstein at gmail.com>  
>> wrote:
>>
>> Folks,
>>
>> In re: patterns UPSTREAM and DOWNSTREAM are a bit ambiguous, e.g.  
>> some folks think "the packets will go DOWNSTREAM" vs. UPSTREAM.  I  
>> know we're back to the verb/noun/adverb/whatever argument, but if  
>> you have to think about it...
>>
>> I've quit trying and am using the following (less poetic) #defines  
>> instead:
>>
>> #define	ZMQ_STREAM_SOURCE	ZMQ_DOWNSTREAM
>> #define	ZMQ_STREAM_SINK		ZMQ_UPSTREAM
>>
>> IMO this makes the code a bit more readable at a glance.
>>
>> (And food for thought re: the 0MQ 3.x API :-) )
>>
>> Best,
>> Matt
>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100611/7854cacc/attachment.html>


More information about the zeromq-dev mailing list