3 ms·
Article author here. To me the big advantage of Protocols as opposed to ABCs, is that you don't have to have your classes implement a special base class and can
by DandyDev 5y ago
Article author here. To me the big advantage of Protocols as opposed to ABCs, is that you don't have to have your classes implement a special base class and can instead focus on the _consuming_ code. Using a Protocol for a function parameter works even for passing in objects of classes you don't control.