4 ms·
I think this is nicely solved in Swift.
by auggierose 8y ago
I think this is nicely solved in Swift.
- ken 8y agoHow? I don't know any way to do a bulk update of an immutable structure in Swift, apart from constructing an entirely new structure and passing all values (not just changed ones) to its initializer.
- auggierose 8y agoYou can just declare all members of the structure as vars. The structure will still be immutable.