Update on SE-0057

Hi everyone. The core team is continuing to review the status of older proposals in order to bring their status into line with reality. SE-0057 introduced the ability for Swift to import Objective-C lightweight generics as compile-time generic types in Swift, with some limitations due to the type-erased nature of generics in Objective-C. Although this proposal was accepted, and claimed to be in the "Implemented" state, one aspect of the proposal was not implemented. The originally accepted proposal described an informal protocol by with Objective-C classes could optionally provide generic argument information back to Swift:

A parameterized Objective-C class can opt in to providing information about its type argument by implementing a method classForGenericArgumentAtIndex: either as a class method (for the first case described above) or as an instance method (for the second case described above). The method returns the metaclass for the type argument at the given, zero-based index.

However, that informal protocol was never implemented. The Core Team has decided to withdraw this aspect of the proposal.

Terms of Service

Privacy Policy

Cookie Policy