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

CollectionEnvelope<T>, ListEnvelope<T>, etc. should support the Stream<T> in ctor #1584

Open
dgroup opened this issue Apr 14, 2021 · 1 comment

Comments

@dgroup
Copy link
Contributor

dgroup commented Apr 14, 2021

What do you think about adding a separate constructor to CollectionEnvelope<T>, ListEnvelope<T> which allows to pass Stream instead of collection?

It allows to have lazy initialization without scalar+sticky.

@victornoel
Copy link
Collaborator

@dgroup could you show an example of what you mean by "It allows to have lazy initialization without scalar+sticky."?

There are two different points we have to clarify:

  • since Stream is quite similar to Iterator, maybe it would be best to only add it to IteratorOf and then use IteratorOf passed to other classes
  • we won't modify the envelopes for this (because it goes counter to what envelopes are for), but it's not a problem since the same should be achievable by a wrapped class instead, that's why I would like to see an example to be sure I clearly understand the need :)

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

No branches or pull requests

3 participants