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

Ordered set insert requires duplicate checks #641

Open
TomokiMiyauci opened this issue Aug 17, 2024 · 4 comments
Open

Ordered set insert requires duplicate checks #641

TomokiMiyauci opened this issue Aug 17, 2024 · 4 comments

Comments

@TomokiMiyauci
Copy link

What is the issue with the Infra Standard?

In the current specification, "add" is not defined.

infra/infra.bs

Lines 1492 to 1493 in 0805cea

<p>To <dfn export for=list,set>insert</dfn> an <a for=list>item</a> into a <a>list</a> before an
index is to add the given item to the list between the given index &minus; 1 and the given index. If

Therefore, insert in ordered set is missing the “do nothing in case of duplicate item” statement.

There should be a definition for ordered set like append or prepend.

@domenic
Copy link
Member

domenic commented Aug 18, 2024

Can you give an example of a spec that needs insert, and for which append/prepend does not suffice?

@TomokiMiyauci
Copy link
Author

My understanding is that insert is already defined for set as well as list.

<dfn export for=list,set>insert</dfn>

Is this incorrect?

@domenic
Copy link
Member

domenic commented Aug 19, 2024

Yes, I'm just wondering if we should delete that and rely on people using append/prepend instead.

@TomokiMiyauci
Copy link
Author

It seems necessary to investigate how much the ordered set insert is being referenced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants