[Bro-Dev] set and vector operators
Vern Paxson
vern at icir.org
Thu Apr 26 09:29:24 PDT 2018
> 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.)
But I don't think we should forego '+' and '-' for sets. It would be too
weird that "v += e" works but "s += e" does not (and "add v[e]" blows, so
let's not consider going down that path :-P). Once we have s += e, we
certainly should have s -= e. And once we have "s + e", "s1 + s2" seems
very natural to me too; I don't relish having to explain "oh *that* doesn't
work, you have to use s1 | s2" :-P.
> will have different preferences which version to prefer; they may not
> even remember the other one.
Seems to me they're both sufficiently mnemonic that this isn't a big worry.
Vern
More information about the bro-dev
mailing list