This page shows the source for this entry, with WebCore formatting language tags and attributes highlighted.

Title

<c>IAsyncEnumerable</c> for and by dummies

Description

This isn't a terrible video on <c>IAsyncEnumerable</c> but it's also not nearly as high-level and fast-paced as I'm come to expect from the <i>.NET Deep Dive</i> series, which is no-muss/no-fuss with Stephen Toub. Those are much better than this one but, if you're not grokking what <c>IAsyncEnumerable</c> is good for from the documentation or examples, maybe this one-hour video will help. If you're lucky, it will make you feel better about your own skills as a programmer. <media href="https://www.youtube.com/watch?v=FbzZJ0pgobg" src="https://www.youtube.com/v/FbzZJ0pgobg" source="YouTube" width="560px" author="dotnet / Chase Aucoin" caption="On .NET Live: Supercharge .NET with IAsyncEnumerables: Efficient Data Streams"> Maybe I'm just super-smart but I can't understand why so many of Microsoft's .NET videos spend time discussing the <c>_</c> separators in numbers. Hanselmann <i>always</i> points it out whenever Toub uses them in a longer constant like e.g., <c>10_000_000</c>. Whereas it seems blindingly f"&king obvious what they're for, Cam Soper in this video just <i>had</i> to ask about them, presumably because, even though he almost certainly knows what they are, he thinks that the audience for a video about <c>IAsyncEnumerables</c> would also be unable to intuit what those symbols might be. <img attachment="highlight_anything_you_think_seems_stupid.jpg" align="right" caption="Highlight anything you think seems stupid">So, they get three people involved in a discussion about thousands separators. It's a waste of time. OMG, I started writing this rant at what I thought was the end of the "basic C# syntax" discussion but I was <i>wrong</i>. They continued for thirty more seconds, with a fourth person chiming in. <iq>C# 7; I just verified.</iq> Congrats, guys! We solved it! The next thing we got to do was watch the async guru use <i>Task Manager</i> to do memory profiling. Have these guys never heard of <i>Benchmark.Net</i>? Or are they just trying to make other developers feel better about themselves? I am fascinated that they don't explain the mechanism behind the <c>IAsyncEnumerable</c> at all. Chase just talks about it as it were magic rather than an enumerable that returns a sequence of <c>Tasks</c>. The magic is in the <i>enumerable</i> part, which allows an algorithm to avoid creating all of the data in memory at once. The example at <b>57:00</b> with <a href="https://learn.microsoft.com/en-us/dotnet/api/system.io.pipes?view=net-8.0">System.IO.Pipes</a>, <c>System.Text.Json</c>, and <c>IAsyncEnumerable</c> was quite nice, though. It shows the power of the piping abstraction (which lies below streams). It's a pity they didn't get into that more but maybe a follow-up video by Stephen Toub is in the offing.