Objective–C: Add something similar to C++’s `auto` keyword

Originator:steipete
Number:rdar://21765831 Date Originated:10-Jul-2015 04:33 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7 (7A152u)
Classification:Enhancement Reproducible:Always
 
Summary:
With the new lightweight generics in Objective–C, the types of the foundation containers — especially dictionaries — become quite a burden.
When using Objective-C++, a lot of this pain can be alleviated by use of C++’s `auto` keyword, but for pure Objective–C, this is currently not an option.

Although use of `auto` with Objective–C generics has a couple of limitations in its current form — more radars forthcoming — it’s better than nothing already.

Come to speak of it, using `let` and `variable` to define type–inferred local symbols, would be even better than just hoisting over `auto` from C++–land.

Notes:
This is a duplicate of rdar://21765475

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!