[swift-evolution] [swift-evolution-announce] [Review] SE-0131: Add AnyHashable to the standard library
Brent Royal-Gordon
brent at architechies.com
Tue Jul 26 08:40:36 CDT 2016
> On Jul 23, 2016, at 3:26 PM, Chris Lattner <clattner at apple.com> wrote:
>
> The review of "SE-0131: Add AnyHashable to the standard library" begins now and runs through July 25. This proposal is a bit unusual, since it is a late additive proposal. The reason we need to do something here is as a critical part of "SE-0116: Import Objective-C id as Swift Any type”, enabling importing untyped NSDictionary's and NSSet’s properly. The core team considers this already conceptually approved for Swift 3 as part of SE-0116, but would greatly appreciate feedback on the details of the proposed design.
Skipping the usual rigamarole:
Looks great, and quite aside from its use in bridged dictionaries, I'm sure users will happily abuse it for heterogeneous comparisons.
My only comment is this: Is the `base` property following some convention established by other type-erased wrappers? If not, I would suggest either `any`, `value`, or `wrapped`; `base` seems to suggest something like a base class, which is not what's going on here.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list