>>> [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. > > 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.
Something similar is already available in context of expiration callbacks for tables using multiple indices (see e.g., https://github.com/bro/bro/blob/master/scripts/base/frameworks/intel/main.bro#L258). Introducing tuples would probably allow to get rid of using the any type at this point. Maybe there are also some scripts, whose readability can be improved by using tuples. Jan _______________________________________________ bro-dev mailing list [email protected] http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev
