-In older versions of C\# we were cautioned against using large value types and value types with mutable state. Recent changes to the C# language The ability to pass or return structs by reference or readonly reference and the *readonly* specifier (as applied to structs, struct properties, struct property get accessors and struct methods) work together to greatly mitigate prior concerns about the use of large structs. Moreover, the readonly specifier allows specification of which methods and properties (if any) might mutate the value of a struct, making it easier to deal with mutable structs without defensive copying. For isolating shared mutable state, however, particularly for use within a read-write or basic vault, large mutable value types are **ideal**. For that reason, this project provides a [guide document](https://github.com/cpsusie/DotNetVault/blob/v0.2.5.x/Advantages%20of%20Using%20Large%20Mutable%20Structs.pdf) for how to design large immutable value types in general as well as how to design large mutable value types as a shared state repository for usage with a ReadWrite vault. If you have trouble reading the pdf with your browser or otherwise desire, the document can be downloaded [here](https://github.com/cpsusie/DotNetVault/raw/v0.2.5.x/Advantages%20of%20Using%20Large%20Mutable%20Structs.pdf).
0 commit comments