5 ms·
well C# 8.0 introduced async streams, for example
by platz 7y ago
well C# 8.0 introduced async streams, for example
- dgudkov 7y agoThe async model in F# is entirely different from C#. Not sure if an equivalent of C# async streams would make sense in it.
- adgasf 7y agoF# allows you to implement such features as libraries using computation expressions.
- louthy 7y agoSo does C# with LINQ [1]. I guess C# language development tends to lean more on concrete syntax than libraries, which is a shame, but it is possible. It's also a shame LINQ can't be extended like computation expressions. [1] https://github.com/louthy/language-ext/blob/master/LanguageExt.Core/DataTypes/Task/Task.Extensions.cs https://github.com/louthy/language-ext/blob/master/LanguageE...
- chusk3 7y agoYes, and the F# library for asynchronous sequence processing had support added for them shortly thereafter (https://fsprojects.github.io/FSharp.Control.AsyncSeq/library/AsyncSeq.html https://fsprojects.github.io/FSharp.Control.AsyncSeq/library...)
- phillipcarter 7y agoIt's worth noting that this isn't an "IL feature", but a new type that includes some knowledge of the type shape in the C# compiler. The existing F# package for async streams understands the new type, and it "just works" in F#.