Erik Meijer, Immo Landwerth, and Andrew Arnott: Immutable Collections for .NET
Erik Meijer interviews .NET team PM Immo Landwerth and Software Developer Andrew Arnott. The topic is Immutable Collections, a new set of immutable types for .NET. You can play around with these today as part of a preview release (NuGet link below). Tune in!
Niners asked questions in advance and some of them were addressed. Thanks again for asking and sorry we didn't get to all of them, but many of the topics were covered (what, why, how, etc...).
Over the last years .NET added many features to make writing multithreaded applications easier. This includes the Task Parallel Library (TPL) as well as the new async/await keywords features to reduce the friction when writing asynchronous code. However, it's still challenging to keep mutable state under control when multiple threads are involved. A common approach is to make use of immutable state that can be passed freely between different threads.
- Immo Landwerth
The NuGet package preview includes these types:
- ImmutableDictionary<K, V>
- ImmutableSortedDictionary<K, V>
Interfaces for each of these types are also defined to facilitate exchange of immutable collection types that may be implemented differently to optimize for very specific performance or memory requirements.
See Andrew's blog for more detailed information (on immutable types for .NET and more. Lots of great info...).