Quantcast
Viewing latest article 20
Browse Latest Browse All 130

Re: Future directions for C# and Visual Basic

The async functionality in C# 5.0 and VB 11.0 look really nice.  The only thing that really disappoints me is that it completely ignores IObservable<T> which is a shame as it appears that it would work amazingly well when paired with the Reactive Framework extensions.  It is my opinion that if await were to be combined with foreach that a really simple and easy to follow syntax could be created to allow "enumeration" over IObservable<T> and IAsyncEnumerable<T>:

foreach(var file in await Directory.EnumerateFilesAsync("*.mp3", SearchOptions.AllDirectories)) Console.WriteLine(file);

Similarly, I think that combining async with yield could make for a really simple way to create new observables.

posted by Halo_Four


Viewing latest article 20
Browse Latest Browse All 130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>