Swift: Use NSArray and NSDictionary
| Originator: | marcel.weiher | ||
| Number: | rdar://17230167 | Date Originated: | |
| Status: | Closed | Resolved: | Wontfix |
| Product: | Xcode | Product Version: | 6.0 |
| Classification: | Reproducible: | NA |
Summary: Having multiple subtly different implementations of the same concepts is confusing and unnecessary. NSArray and NSDictionary already exist, please just use them. Swift Array and Dictionary don't add anything substantial (that's not to say that they don't add anything) except for confusion, especially since the rules for their use and interaction are anything but straightforward. For example, Array and Dictionary are structs and therefore passed by value. Except that Array is a special case and seemingly passed by reference...most of the time. Also, "let" structs are immutable, except for Array, which is not. Huh? In fact, in order to get an array that is actually immutable, you need to use an NSArray, which confusingly is a ref/class, which are usually the things that are mutable even if they are defined using a let.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!