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

Iteration: an internal Map + MapIterator vs an internal List + something else? #20

Closed
Tracked by #1
ljharb opened this issue Jun 2, 2023 · 1 comment
Closed
Tracked by #1

Comments

@ljharb
Copy link
Member

ljharb commented Jun 2, 2023

In #17, I changed the spec to use a Map internally, and then to reuse a Map iterator.

A suggested alternative was to use a List internally, and just iterate over the list. However, that would require either creating a new intrinsic IntrinsicIterator, or, to just use a standard generator, neither of which feels ideal.

Thoughts?

@ljharb ljharb mentioned this issue Jan 19, 2023
24 tasks
@ljharb
Copy link
Member Author

ljharb commented Sep 21, 2023

I'm going to recommend here to use a Map iterator, rather than creating a new intrinsic. The Map instance itself never needs to be reified.

If implementations have an issue with this, then my fallback would be to make an IntrinsicIterator intrinsic.

Closing, since the spec currently uses the Map iterator and I've heard no strong opinions on this.

@ljharb ljharb closed this as completed Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant