2 ms·
I wonder why the designers of Swift decided to make arrays structs on the outside but complex on the inside. Why not make them objects, i.e. reference types, as
by mwcampbell 11y ago
I wonder why the designers of Swift decided to make arrays structs on the outside but complex on the inside. Why not make them objects, i.e. reference types, as in Java and .NET?
- mikeash 11y agoBecause having collections be value types makes them really nice to work with.