Skip to content

[Stdlib] Tweak doc comment for Indexable.startIndex #824

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

Closed

Conversation

lilyball
Copy link
Contributor

The complexity of this property may actually be O(N) for some lazy
collections.

Fixes SR-425.

The complexity of this property may actually be O(N) for some lazy
collections.

Fixes SR-425.
@dabrahams
Copy link
Contributor

That isn’t how I want to handle SR-425. The conformance of LazyFilterCollection to CollectionType has always been, and will always be, a little fishy. We address that by aggressively commenting it as an imperfect model, rather than weakening other guarantees.

@dabrahams dabrahams closed this Dec 31, 2015
@lilyball
Copy link
Contributor Author

@dabrahams How about FlattenCollection? It's not a LazyCollectionType, but it is still is inherently lazy in its own operation, so e.g. [[],[],[],[],[],[1]].flatten() is O(N) on startIndex (and on first).

@dabrahams
Copy link
Contributor

How about it? If it doesn’t have appropriate caveats in the doc comments, it should.

@lilyball
Copy link
Contributor Author

I've submitted #829 instead that updates doc comments on the lazy collections.

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

Successfully merging this pull request may close these issues.

2 participants