Y
Hacker News
new
|
ask
|
show
|
jobs
by
maltalex
168 days ago
Immutable collections exit, they were just added later. See System.Collections.Immutable:
https://learn.microsoft.com/en-us/dotnet/api/system.collecti...
2 comments
zmj
168 days ago
Those collections are more like copy-on-write than actual immutable. System.Collections.Frozen is the real thing.
link
rawling
167 days ago
Isn'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?
link
andix
168 days ago
I do a lot of .NET programming, and I've never seen them getting used. :O
link
ygra
168 days ago
Roslyn, the C#/VB compiler, uses them extensively, but in other code they're indeed quite rare.
link