[Discussion] Easing the learning curve for introducing generic parameters

If bare protocol names were forbidden, learners would be guided via code completion to choose either a generic parametrization of the type/function (as proposed), the addition of the some keyword (where allowed) or the addition of the any keyword (as a third option, of course). Requiring any results in a call for action for the programmer who will be forced to understand that there's the trichotomy generic/opaque/existential when working with protocols. A simple search on the web (or better, a link to the proper apple/swift/userdocs document) would then explain their differences.

5 Likes