Overall +1. Great work.
I'm curious about one point, in the proposal, you said you won't support objc lightweight generics, and I wonder is it possible that OC generics is supported in a limited way?
For example, user can still define a generic class in header files, but when implemented using Swift, Swift sees the header in a way that all generic signatures definitions are dropped, and all generic references are erased to Any
.
Like this:
// OC header
@interface Config<T>: NSObject
- (void)setValue:(T)value;
- (T)getValue;
@end
// Swift impl
@implementation extension Config {
public func setValue(_ value: Any) {}
public func getValue() -> Any {}
}
It is up to the implementor to obey the generic contract, just like in old OC ways.