-
Notifications
You must be signed in to change notification settings - Fork 621
Replace "ToPull" operations with "Pull.uncons" #3098
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
Conversation
diesalbla
commented
Jan 5, 2023
- Pull - Add an uncons extension method for closed Pulls (unit)
- Stream - Avoid "newStream" use streamNoScope
- Avoid the ".pull" method, use the new ".uncons" method on Pull-Unit
95cc83c to
e820844
Compare
|
Thoughts:
|
We can always publish those APIs, if they are useful enough. |
|
I don't know if that's a good idea. Seems like a lot of churn API-wise (all the recursive pulls that would need to change to use a pull instead of stream argument). What's the benefit we get for that churn? |
Perhaps reducing the need for a second type wrapper, |
a3a4ce2 to
7eb73d5
Compare
7eb73d5 to
6312480
Compare
|
the |
Perhaps we should rename them as Edit or maybe, add a
|
|
We need the default behavior of a pull-to-stream conversion to introduce a scope, or otherwise risk resource leaks.On Jan 6, 2023, at 5:42 PM, Diego E. Alonso Blas ***@***.***> wrote:
I'm a slight -1 on using streamNoScope over new Stream: it forces all readers to having to think about what a scope is, which arguably isn't necessary until much later on in their journey
Perhaps we should rename them as stream and scopedStream, giving the more complex notion the longer name.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
|
I thought that introducing a scope is safer, and should be the default? At least that's the feeling I get from the scaladocs. In fact I feel like fs2/core/shared/src/main/scala/fs2/Pull.scala Lines 315 to 318 in 53465e5
|