3 ms·
I think it can be reduced into simpler terms in fact. In swift you simply can't do var stuff:Set var stuff:Set<Hashable> var stuff:Set<MyProtocol> S
by seanalltogether 11y ago
I think it can be reduced into simpler terms in fact. In swift you simply can't do
var stuff:Set
var stuff:Set<Hashable>
var stuff:Set<MyProtocol>
Sets don't allow for mixed base types, and that's what a protocol would allow. All objects in a set must contain a similar base type. This is actually true in obj-c as well where everything in a set had to derive from NSObject.