Skip to content
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

"Union" could have more description, and maybe a new name #21

Closed
gregsdennis opened this issue Sep 24, 2020 · 3 comments · Fixed by #147
Closed

"Union" could have more description, and maybe a new name #21

gregsdennis opened this issue Sep 24, 2020 · 3 comments · Fixed by #147

Comments

@gregsdennis
Copy link
Collaborator

gregsdennis commented Sep 24, 2020

The term "union" will likely be unfamiliar for readers (it is for me) and could use a bit more description than "A union matcher selector consists of one or more union elements."

"Union" isn't a common term outside of set manipulation. I would call the [...] an "indexer," which is a much more well-known term and is already associated with this construct in many programming languages. The values inside are indices (as opposed to "union children" or "union elements"), of which there are multiple types:

  • Integer
  • Slice
  • String
  • Container query expression
  • Item query expression

See selector query expressions for more details on the query-style indexers.

@glyn
Copy link
Collaborator

glyn commented Sep 24, 2020

Good point. We have yet to decide whether unions remove or preserve duplicates and I think the outcome of that decision should influence the naming. "Union" as you point out has a set theory connotation and implies removing duplicates. It's tricky though because I think the result is ordered, whereas sets aren't ordered.

@gregsdennis
Copy link
Collaborator Author

Regarding duplicates specifically, please see #23.

@cabo
Copy link
Member

cabo commented Jan 17, 2022

Not much actionable discussion here.
Confirm no change needed at 2022-01-18 interim.

cabo added a commit that referenced this issue Jan 23, 2022
Clarify related text; add explanation of change.
Take slice-selector apart to define slice-index.
Close #21.
@cabo cabo added the has PR label Jan 23, 2022
@glyn glyn closed this as completed in #147 Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants