2 ms·
Code duplication yes, but it's not unnecessary. You need them so you can write code that works on Sequences and other such things without knowing the actual imp
by mikeash 9y ago
Code duplication yes, but it's not unnecessary. You need them so you can write code that works on Sequences and other such things without knowing the actual implementing type.
Ideally this would not be necessary, and in some future version of Swift it probably won't be, but for now it is.