Replies: 1 comment 1 reply
-
Another pitfall... Great... Thank for the heads up. We documented this edge case in our projects. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I often use LazyCollections and find them helpful in different situations.
I think there is one problem with them - the underlying
passthru()
method.It is justified for the use cases it supports. However, it uses
collect()
which means that we no longer have a truly LazyCollection. Instead we have something that collects all values and then tries to yield them again, pretending to be a generator. This might be a serious problem when dealing with large streams of data.What if we added
strict()
which basically forbids usingpassthru()
? It would definitely limit the versatility ofLazyCollection
, though on the other hand, it would ensure that the collection remains lazy.Edit: If this proposal makes sense, I would gladly work on the implementation.
Beta Was this translation helpful? Give feedback.
All reactions