Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Enforce consistency between the available operations of IterableOnce and Iterable #465

Closed
julienrf opened this issue Feb 19, 2018 · 4 comments
Assignees
Milestone

Comments

@julienrf
Copy link
Contributor

Currently these collection types don’t have a common super type.

@lrytz suggested that we write some tests that use reflection to check that the operations and type signatures are consistent between them.

@lrytz
Copy link
Member

lrytz commented Feb 19, 2018

Here's a the current diff of Iterable vs Iterator operations: https://gist.github.com/lrytz/39bdb1b25c23e204c3263809534ba6a0/revisions#diff-5b3b7587cc6e69d92ccb282bab852b31

@lrytz
Copy link
Member

lrytz commented Feb 19, 2018

@szeiger
Copy link
Contributor

szeiger commented Feb 22, 2018

This sounds a lot like the IterableMonoTransforms we had in earlier iterations of the design.

@szeiger
Copy link
Contributor

szeiger commented Feb 22, 2018

I had a look at the diff and most of what I saw looks reasonable. Iterator does not have methods like dropRight that would require forcing and caching everything. OTOH, because an Iterator represents a single traversal, it has some Seq-like features that are missing from Iterable.

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

No branches or pull requests

3 participants