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

There is no systematic way of documenting how lazy a non-strict collection operation is #11498

Open
julienrf opened this issue Apr 23, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@julienrf
Copy link

commented Apr 23, 2019

In LazyList, strict operations have the following description:

image

It contains both “Note: Even when applied to a view or a lazy collection it will always force the elements.” and “This method evaluates all elements of the collection.”, which are redundant, IMO.

Some operations have the following comment:

image

“This method preserves laziness; elements are only evaluated individually as needed.” But this note is not present in the View operations.

We should use only one way to document whether an operation is strict or non-strict, and in case an operation is “mostly lazy” (e.g., takeRight) we should clearly document what will be evaluated and when.

@lrytz lrytz added the docs label Apr 23, 2019

@julienrf julienrf added this to the 2.13.0-RC2 milestone Apr 23, 2019

@NthPortal

This comment has been minimized.

Copy link

commented Apr 23, 2019

we could potentially re-define whatever variable produces "Note: Even when applied to a view or a lazy collection it will always force the elements." to an empty string? either that or all the LazyList methods need to duplicate their parent scaladocs, which seems un-ideal.

@julienrf

This comment has been minimized.

Copy link
Author

commented Apr 24, 2019

Yes, we can probably use a variable for that.

@lrytz lrytz modified the milestones: 2.13.0-RC2, 2.13.0 May 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.