Probably I'm totally confused, then sorry. But Swift's 'Sequence' now means(read 'implemented as') "ordered or unordered" bag of things, no constraint, so it is not in harmony with mathematical definition. But 'Set' currently is unordered bag of things.
As I understand the core team's (and other's) replies on that subject [please correct me if I'm wrong] - the already existed generic code written over Sequence protocol should still be allowed to accept Sets and Dictionaries.
I, as a developer, given current meaning of Sequence, and understanding that this most likely will not be changed[ABI stabilization, breaking changes etc], want at least be able to limit MY generic code to allow only "ordered" Sequences, if this is important for that particular code.
So, isn't the solution(well, workaround) here is to be able to write something like:
func foo(..) where T: Sequence&Ordered {...}
, and don't conform Set and Dictionary to that Ordered protocol, but other sequences should be conformed to it.
I.e. nothing will be changed internally, just new empty(?) protocol Ordered be introduced and each built-in "ordered" sequence will conform to it additionally. Probably even typealias OrderedSequence = Sequence&Ordered could be introduced.
But IIUC the rule we have regarding protocols is that they should not be just "markers" but should be useful. And such Ordered protocol is not useful by its own. Probably there could be an exception in that rule?
Dumb idea? :-)