> Oh, neat. If that actually works in all cases (so also with records of
> records, etc)
Well, it almost does. I tried it with records that contain records and
that's fine. For records that contain sets, it often works in my testing,
but not always, evidently due to the randomized hash keying,
On Fri, Jun 29, 2018 at 08:58:25AM -0700, Vern Paxson wrote:
> This in fact suggests we could implement record equality by converting the
> records to hash indices and then comparing those.
Oh, neat. If that actually works in all cases (so also with records of
records, etc) I would be totally on
> I assume what will at the moment happen with sets is that the pointers of
> records are checked for equality
Specifically, in my branch they are checked for whether the composite hash
index matches. Happily, this works:
type A: record {
a: string;
};
On Sun, Jun 24, 2018 at 07:07:06PM -0700, Vern Paxson wrote:
> s1 == s2 iff both sets have exactly the same members
>
> s1 < s2 iff every element in s1 is in s2, but s2 has some
> elements not in s1
[...]
> Any concerns with adding these too?
I actually
I've implemented the set operators we discussed, and am now developing
test cases.
In the process, I'm finding that it would be handy to have set equality
and subset/superset testing. These would be (for type equivalence sets):
s1 == s2 iff both sets have exactly the same members