8 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 9mo 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 9mo agoI do a lot of .NET programming, and I've never seen them getting used. :O
- ygra 9mo agoRoslyn, the C#/VB compiler, uses them extensively, but in other code they're indeed quite rare.
- zmj 9mo agoThose collections are more like copy-on-write than actual immutable. System.Collections.Frozen is the real thing.
- rawling 9mo 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?