> On 19 Aug 2016, at 18:00, Tim Vermeulen via swift-users 
> <swift-users@swift.org> wrote:
> 
> Any idea why Swift supports implicit casting to AnyHashable, but not to, say, 
> AnySequence?
> 

It’s a hack until existential support gets better. Explicitly casting to 
AnyHashable clutters your dictionary literals.

There’s a fair amount of code in the compiler to support it, it’s probably just 
not worth the effort for other types (and since they were never anything else, 
nothing has regressed for them as it did for AnyHashable).
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to