[Bro-Dev] set and vector operators

Johanna Amann johanna at icir.org
Thu Apr 26 14:53:18 PDT 2018

On Thu, Apr 26, 2018 at 09:29:24AM -0700, Vern Paxson wrote:
> > Just one more thing still: I'm actually feeling pretty strongly
> > against having multiple different operators for the same operation
> > (set union, set addition/removal).
> I'm fine with removing "add" and "delete" for sets!  (But seems we gotta
> keep them for a good while for backward compatibility.  Plus, what would
> be the remove operator for tables?  "t -= index" seems pretty weird to me.)

Perhaps my thinking is too driven by how this is handled internally - but
thinking that way I am kind of opposed to get rid of add and delete for
sets. For me sets were always a special case of tables - and it made
complete sense that they operate in the same way.

I think I actually would prefer just keeping add/delete, at least for
sets, and not introduce the plus-syntax. While it is a bit shorter,
add/delete is also not that ugly. And while you did not like the argument
of Jon that that lets you more easily determine what is going on in the
code I kind of think it has a bit of merit.


More information about the bro-dev mailing list