Apple Swift Programming Language
Protocol-Oriented Logging, or: Default Arguments in Swift Protocols
Protocol-Oriented Logging, or: Default Arguments in Swift Protocols
Swift 2.2 doesn't allow default arguments in protocol declarations. This is a problem if you want to create a protocol that acts as an abstraction for logging. However, we can use default arguments in protocol extensions, and that allows us to work around the problem.
oleb.net



