-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heterogeneous Sets #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far!
Two thoughts:
- What makes this an ordered set? We don't have an ordering relation (and ordering heterogeneous lists sorta defies the concept)
- I haven't cloned and played with it yet, but what happens with union when the same label occurs in both sets?
1. 2. Changing ordered_set.union(singleton).union(another_set); to ordered_set.union(singleton).union(another_set.clone()).union(another_set); fails at compile time with this charming error message:
|
So, normally when I think of a union operation of two overlapping sets (where some labels exist in both sets), the union shouldn't fail but just return all the labels that exist. This becomes slightly more complicated with our requirements, as two things that are So, an |
No docs and tests could greatly be improved, but this is what I have done so far on HSets.