Unindexed, unkeyed subscript assignment syntax for ObjC objects
| Originator: | rix.rob | ||
| Number: | rdar://14012514 | Date Originated: | 29-May-2013 12:25 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 4.6.2 (4H1003) |
| Classification: | Enhancement | Reproducible: | Not Applicable |
Summary: ObjC currently supports indexed and keyed subscript methods for access and assignment: array[0]; array[0] = value; dictionary[@"key"]; dictionary[@"key"] = value; I would like to add unindexed, unkeyed assignment syntax to that list: array[] = value; Regardless of what message selector this would be mapped onto, it would be intended to be used on e.g. NSMutableArray and NSMutableSet as a synonym for -addObject:. It would not be implemented on NSMutableDictionary, since assignment to a dictionary without a key does not make sense. I do not know if an additional access syntax would make sense: id object = set[]; If so, I would presume this would effectively be a synonym for -anyObject. Steps to Reproduce: N/A Expected Results: N/A Actual Results: N/A Regression: N/A Notes: N/A
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!
duped as rdar://14012537