-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
Description
Protocols are an object-oriented swift feature where classes, structures and other protocols can share and implement similar functionality. That way, two classes can make use of a simple blueprint of methods, properties and other requirements that suit a given task.
protocol A {
mutating func a() { }
func b() { }
// more code...
}
Protocols are similar to Mixins in Dart, and they are exported in Objective C as @protocol
with a SWIFT_PROTOCOL
macro function