> I'm probably opening up a whole new can of worms here, but if we said > that the following were both vector operators: > > ^ == intersection operator > v == union operator > > then these could have potentially useful meanings on their *own* as set > operators, as well as modifying other operators. For example: > > @a = (1,2,3); > @b = (4,1,3); > > @a = @a ^ @b; # @a = (1,3); > @a = @a v @b; # @a = (1,2,3,4);
Or is @a = (1,2,3,4,1,3) ? No... I'm assuming two things: 1) that v (union) uniqifies the elements in its array, as does ^. 2) that the v (union) modifier includes elements that exist in either the first set or the second set, and that ^ includes elements that exist in both sets. These are pragmatic operators; I've done this type of thing *exceedingly* often. The behaviour you describe is the concatenation of the two sets. I can get that for free by saying push(@a, @b), or @a = (@a, @b); And since admittedly they are pragmatic, people are welcome to overload them. But right now as it stands '@a v= @b' is nonsense; it might as well be put to work. Ed ( ps - as an aside, are the apocalypses going to be backdated as changes to the design come up? Or are the apocalypses just a first draft for more enduring documentation? )