[swift-evolution] Static Dispatch Pitfalls

Vladimir.S svabox at gmail.com
Sun May 22 01:49:30 CDT 2016


On 22.05.2016 3:01, L. Mihalkovic via swift-evolution wrote:
> Read the proposal... I have an aversion to-go coffee cups that remind
> people that hot coffee may burn them, and when my daughter was 4 we
> explained to her why knives were to be handled with care, rather than
> remove them all from her sight. IMHO the proposal evoques mandating
> training wheels rather than letting people learn naturally from their
> errors.

I can partially support this opinion. But we have a situation with protocol 
extension methods and static dispatches in which we need Swift's help on 
compilation stage. IMO Using your words, right now we just got knife in our 
hands *without* any explanation. Then we hurt ourselves, and *then* we know 
that such methods will be dispatched statically(and the rule of dispatch is 
quite non-obvious). This is another extreme like "remove all knives". We 
need some golden middle. Personally I believe the solution is in compiler 
warning and in some method to 'fix' this warning.




More information about the swift-evolution mailing list