Considering the difficult migration for libraries (refs 1, 2), keeping @_primaryAssociatedType in one form or another would help (and then order would matter, yes, and this would be very clearly understood):

// New syntax
protocol MySequence<Element> { }
protocol DictionaryProtocol<Key: Hashable, Element> { }

// Alternative syntax for libraries with compatibility constraints
protocol MySequence {
  #if compiler(>=...)
  @primaryAssociatedType associatedtype Element
  #else
  associatedtype Element
  #endif
}

protocol DictionaryProtocol {
  #if compiler(>=...)
  // Order matters: deal with it
  @primaryAssociatedType associatedtype Key: Hashable
  @primaryAssociatedType associatedtype Element
  #else
  associatedtype Key: Hashable
  associatedtype Element
  #endif
}

The acceptance notes for SE-0035 (Introduce existential any) has postponed the discussion about the transition path. Maybe the transition path for this pitch will be postponed as well. But postponing does not mean ignoring, right?

And if each transition path needs its own pitch and proposal, well this puts the transition path in great danger, since very few people understand the need for those transition paths, and among them even less have the ability and time to complete a proposal and its implementation.

1 Like