[swift-evolution] [Review] SE-0131: Add AnyHashable to the standard library

Nate Cook natecook at gmail.com
Mon Jul 25 15:12:03 CDT 2016


> 	https://github.com/apple/swift-evolution/blob/master/proposals/0131-anyhashable.md

+1!

This proposal looks great to me. I only have one nitpick: it looks like there's a '_Hashable' protocol used in the Dictionary extension to get around the limit on generic subscripts. Swift has managed to remove most (all?) underscored protocols from public APIs, so I would just suggest that the implementation consider an alternate name that isn't underscored. Something like 'HashableBase' would still imply that the protocol is more of an implementation detail than a useful protocol on its own.

Nate



More information about the swift-evolution mailing list