3 ms·
Immutable collections exit, they were just added later. See System.Collections.Immutable: https://learn.microsoft.com/en-us/dotnet/api/system.collections.immut
by maltalex 10mo ago
Immutable collections exit, they were just added later. See System.Collections.Immutable:
https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable https://learn.microsoft.com/en-us/dotnet/api/system.collecti...
- andix 10mo agoI do a lot of .NET programming, and I've never seen them getting used. :O
- ygra 10mo agoRoslyn, the C#/VB compiler, uses them extensively, but in other code they're indeed quite rare.
- zmj 10mo agoThose collections are more like copy-on-write than actual immutable. System.Collections.Frozen is the real thing.
- rawling 10mo agoIsn't Frozen something you do to a set or dictionary to say, I'm not going to add any more values, please give me a version of this which is optimized for lookup only?