Re:Swift Protocol Oriented Programming and Testing
by jolux on Friday July 30, 2021 @05:25PM
(#28012556)
Rust pretty much only has protocols, and people seem to do fine programming with it. Type classes (protocols, traits) and regular classes are both different ways of achieving polymorphism, which every abstraction needs. It’s just a question of whether you think about your application as oriented around types or oriented around objects.
I don’t even want to bother with answering that question, though. Even Apple didn’t have a clear definition for it, so debating this point seems moot to me, I’m afraid.