[Bro-Dev] set and vector operators

Vern Paxson vern at icir.org
Wed Apr 25 10:58:15 PDT 2018

> That's very similar to what python does, except they use & and | instead of && and ||.
> I think they do that because 'set or' is closer to 'bitwise or' than 'logical or'

Yeah, I thought of that, but Bro currently doesn't have any '&' or '|'
operators, which makes me reluctant to add them just for this.  '&' is
particularly problematic, as it would introduce ambiguity as to whether
"&redef" means the redef attribute, or "use the 'and' operator on the value
of the variable 'redef'".  We'd have to add a bunch of reserved words
to accommodate this.

> They also use ^ for symmetric difference.

(same here re being a new operator)


More information about the bro-dev mailing list