by easton · 1y ago · 0 comments
var y = x with { things I want to change }
https://learn.microsoft.com/en-us/dotnet/csharp/language-ref... y = { ...x, change: 'b' }
And Swift avoids the mutability-problem all together, by providing structs with copy-on-write and self-mutating methods:https://docs.swift.org/swift-book/documentation/the-swift-pr...