[Pitch] Elide `some` in Swift 6

It comes to my mind that the switch of implicitness from any to some has some impact on DocC - both for internal and public code.

I didn't spend more than a few minutes thinking about it, but I can feel that function prototypes displayed by DocC will become a point of confusion unless we are very careful.

In the imaginary DocC page below, are we talking about existentials, or opaque types? When was this documentation generated? Which language mode does it target? Do I have to run implicit conversions in my mind when it happens that I program Swift 6, and read the doc of a Swift 5 package? What if I don't even know the language mode of the package I use? How can I have a non-ambiguous interpretation of what I read, and which amount of knowledge/experience and energy does it take?

Declaration

func frobnicate(_ x: P1) -> P2

Parameters

etc.

Tangential question: will DocC format explicit some P in source code to bare P in the generated doc, or the opposite? Or no formatting at all?

I guess this would be the topic on another pitch… Please pardon me @Joseph_Heck to ping you directly - maybe some members of the Documentation Workgroup have something to say here.

5 Likes