Constrain protocol usage outside the module

Maybe my wording wasn't quite correct there, but I showed in the example what I really meant. You can refine public-but-closed protocol, but you cannot conform your own types to nether the public-but-closed protocol nor to your refinement, the only conformance you're allowed to make is to a type which already conforms to that protocols - which is a type from where that protocol was defined. You can only conform your types to open protocols.

Why? As long a we do it in respect of source compatibility that should be fine, or are you saying that we cannot evolve the language any further, and we should not fix areas that couldn't be fixed due the lack of engineering time to implement things in time? I think @tkremenek mentioned that in a different topic that we should still be able to evolve the language even if the ABI is closed, but I still get the impression from such replies as yours now that the ship has sailed for the language to evolve any further.

Funny that you ask. Wasn't it you who said long time ago that to solve a particular problem I described we can use enums, to be more precise anonymous enums cases?

// The example was more or less like this
protocol CustomType {
  var instance: IntOrString { get }
}

enum IntOrString {
  case int(Int)
  case string(String) 
}

But now that we know this isn't going to happen at all because we don't want Int | String in the type-system you can no longer argue with that solution against closed protocols. Closed protocols can be used to disallow the user from conforming to a protocol which might be used to hide concrete types from the outside the module for example (isn't Apple also doing this quite often in theirs frameworks? - there are some protocols which you cannot conform to because you cannot instantiate or get all types it requires due to hidden init). I think it's fair to say that the library design is up to developers and should not restricted by language design, especially not when we already have a similar behavior in the language. This will become a generalization of that feature.

One could introduce @closed public protocol for Swift 4 which in Swift 5 mode would mean public protocol and public protocol without @closed from Swift 4 would mean open protocol in Swift 5 mode. Isn't the source compatibility save here?