Replies: 4 comments
-
| Anyway, I just want to point out that the TaskSeq naming isn't perfect Putting aside legacy, the ideal for naming and simplicity purposes would be 
 Then we'd be back to the nicest position that there is just  That makes me wonder if we should already be deprecating/renaming FSharp.Control.AsyncSeq to make room for this. Maybe renaming to  | 
Beta Was this translation helpful? Give feedback.
-
| I see your point, but I'm not sold on this. F# Core has two distinct builders, one for  People have come to associate  If we want to move forward to a single library approach for asynchronous sequences, it's likely that some of the current library functions of  Also, since most F# programmers that I know have typically moved from  I realize there's no perfect solution here. I can certainly see a use-case, and definitely until  Also, with 250k downloads of the latest version alone, and 1.4M in total, deprecating  | 
Beta Was this translation helpful? Give feedback.
-
| 
 PS: yes, I can see this confusion. The reason I started all of this was that in my team people were literally writing code that had  This prompted me, among giving some education on  Which reminds me, I should probably remove functions like  | 
Beta Was this translation helpful? Give feedback.
-
| 
 Noticed something else:  let x = asyncSeq {
    yield 1
}
x :> IAsyncEnumerable<_> // not possibleWe could also implement that interface, though it'll be confusing, as the internally used interface is same-named, they only differ in the naming of getting the enumerator:  I know there's  Not saying there isn't any confusion now. But I just think that having the two disparate yet seemingly equal worlds: tasks and asyncs in the F# ecosystem maybe the best of all the bad choices we have ;). | 
Beta Was this translation helpful? Give feedback.
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 do notice the name "TaskSeq" is confusing some people - people thinking this is about "sequences of tasks". I'm not sure what to do about this.
While thinking about this I included some general notes on naming in this space, see below
F# IEnumerator
HotSynchronousFastEnumeratorIEnumerable<T>F# IEnumerable = Seq
ColdSynchronousFastEnumerableunit -> IEnumerable<T>.NET/F#/C# Task = C# async/await
HotAsynchronousFastValueTask<T>IcedTask ColdTask
ColdAsynchronousFastValueFactoryunit -> Task<T>IcedTask CancellableTask
ColdAsynchronousFastCancellableValueFactoryCancellationToken -> Task<T>Async = F# async
ColdAsynchronousCancellableValueFactoryCancellationToken -> Task<T>Current F# AsyncSeq
ColdAsynchronousCancellableEnumerableCancellationToken -> IAsyncEnumerator<T>Current F# TaskSeq
ColdAsynchronousHalfCancellableEnumerableCancellationToken -> IAsyncEnumerator<T>I'm leaving the question of tailcalls off the list, as much as I'd like to address that.
It's worth noting that at a high level there's no real logical difference between
CancellableTaskand F#Async<_>. Nor between F#TaskSeqand F#AsyncSeq.The sweet spot for F# is really Cold+RunMany+Asynchronous+Fast+Cancellable+Tailcalls, which is what TaskSeq is close to being technically (except tailcalls, sadly).
Beta Was this translation helpful? Give feedback.
All reactions