I have recently inherited a quite undocumented, spaghetti-esque and extremely buggy project written in Swift.
Am tidying up some things here and there, and came across this on every single protocol declaration:
protocol SomeProtocol: class { ...
as in literally : class
- that is not a placeholder for something else.
My question is: What does the : class
achieve or declare?
Personally have never put the : class
afterwards, I usually reserve that for inheriting from other protocols. I removed a couple without result, but figured I should check the actual purpose (if any) before I continue.
Best regards,
Frankie