Aligning the implementation with the proposal (rather than the other way around) would make it less subtle, and it bears mentioning even if it's gnarly to implement that the plan of record does not today include any timeline for deprecation.
As far as I'm concerned, this is the "forever" language we want, which not coincidentally but explicitly exists to address the specific use case you actively asked about.
This is what I don't understand. Leaving compiler compatibility aside... why do we want two ways to express this feature with the second way being so "implicit"?
I mean I do not understand the need for this trick to be "a forever" feature...
This is not nice:
#if compiler(>=6.0)
extension Foo: @retroactive Bar {
// ... conformance implementation ...
}
#else
extension Foo: Bar {
// ... same conformance implementation ...
}
#endif
but at least it's visible (being explicit) and eventually I could get rid of it, say in two years time when compatibility with the old compiler that doesn't support retroactive is no longer a concern.
Ah, you didn't specify that your compile-time conditional is compiler version, merely "someCompilationSwitch".
In the general case, whether Bar is a retroactive conformance or not could depend on something else at compile time. For example, Bar could be polyfilled in the same module on one platform but provided by a third-party library on another platform. You would then need an alternative to @retroactive as a forever feature.
On the other hand, the explicit spelling @retroactive makes it clearer that something unsafe is going on. An extension stating conformance to a fully-qualified protocol name gives no hint that the construction is potentially unsafe.
For sure, @retroactive has enough advantages that it was worth introducing a new syntax.
I think there is a fairly straightforward reorganization of the logic here that handles all permutations without much change and virtually no additional code (and is incidentally also easier to strip out, and does almost no work in the common case where the extended type itself isn't module qualified). Have not tested but will do so and chuck it over the fence at some point if it seems to pan out.