Hi all,

Dynamic dispatch of methods through AnyObject is a source of implementation 
complexity, has many known bugs which we are not going to fix, and no longer 
makes sense now in an id-as-Any world; AnyObject is not the ‘common currency’ 
type for arbitrary Objective-C objects anymore.

I would like to propose we deprecate it as follows:

- Unconditional warning in Swift 4.1, with a fixit to add an ‘as’ cast to cast 
the base value to the right type
- Error in Swift 5 in -swift-version 5 mode

Thoughts? Does anyone actually rely on this feature, instead of just stumbling 
on it by accident once in a while?

Slava
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to