[Bro-Dev] v += e (Re: set and vector operators)
jsiwek at corelight.com
Thu Jun 21 14:58:42 PDT 2018
On Thu, Jun 21, 2018 at 4:23 PM Vern Paxson <vern at corelight.com> wrote:
> > > (3) Implement "v += e" to mean "append the element e to the vector v".
> > Do we want to do this now, or should we potentially wait a release-cycle
> > with it (to prevent the situation where v + e and v+= e means something
> > different).
> Turns out that "v += e" currently generates an error ("requires two
> arithmetic or two string operands"), so it seems safe to me to introduce
> it as append-to-vector concurrent with deprecating "v + e" (which from the
> discussion on the list it seems likely current has little or no use).
Yeah, seems fine for v += e and v + e to temporarily have different
meanings given that the later will, for some time, have a clear
deprecation/warning message for each use (in any rare cases where it
might actually be used). So my current POV is everything you outlined
looks good to do whenever.
More information about the bro-dev