> > [result, value] = Broker::lookup(h, 42) # Returns [Broker::Result,
> > opaque of Broker::Data]
> >
> > if ( result == Broker::SUCCESS ) ...
>
> I would prefer this solution, as it feels more natural coming from other
> languages like python.
I like it as well because there's no call to status() and the concrete
types of the return variables are irrelevant to the user. (Not only
scripting languages but also C++17 finally introduces "structured
bindings" to support this form of local tuple binding.)
The key question is whether it will only be a one-off or fits more
broadly into the language as part of first-class tuple support.
Matthias
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev