Session
Immutability à la C#
Utilizing immutable types - having all their members "pure" - has proven to be an effective technique helping to reason about state, especially in parallel scenarios. Therefore they are heavily used by the .NET Compiler Platform. This reflects in the language being continuously updated with new features to design immutability. The latest additions in C# further expand the toolbox at our fingertips with record types and init-only setters, complementing the good old readonly modifier that entails different semantics depending on its syntactic location.
In this session I would very much like to explore all the different kinds of immutability, and show you how to implement them with the currently available set of keywords, but also inspect available types in .NET, such as the Immutable and Frozen Collections. And, we will reap the benefits of not allowing any (visible) state changes, such as string interning, thread safety, sane singletons, and clearly express intent.
preferred session duration: 60 minutes, including Q&A
demo heavy
Stefan Pölz
Clean C# Coder – Test-driven .NET Developer
Vienna, Austria
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top