Re:On Apple's Love Affair with Swift
by saagarjha on Saturday August 11, 2018 @01:26PM
(#17740618)
I don’t understand how you think this should be implemented. Many classes informally conform to protocols or in some cases the conformance can only be checked at runtime with a respondsToSelector: check. So any generics at compile time stricter than what we currently have will just not work or be useful.
[ Parent
| on HN ]
Not useful as I’d rather find that mistake when a customer reports the crash, instead of having the compiler tell me?
The point I'm making is that the compiler can't tell you this, since conventional Objective-C code does generics checking at runtime. There's just not enough information available for this to be reliably diagnosed.