Re: [swift-evolution] Idea: delegates as protocols and property types with specialised behaviours.

2016-01-03 Thread Alex Popov via swift-evolution
From: Ross O'Brien via swift-evolution Sent: Sunday, January 3, 2016 17:07 Subject: [swift-evolution] Idea: delegates as protocols and property types with specialised behaviours. To: swift-evolution At the moment, the delegate pattern is just one use of protocols. We create a

[swift-evolution] Idea: delegates as protocols and property types with specialised behaviours.

2016-01-03 Thread Ross O'Brien via swift-evolution
At the moment, the delegate pattern is just one use of protocols. We create a protocol with a set of declared functions, implemented either in a protocol extension or in the conforming type - the delegate - and another type calls functions of its delegate, notifying them when certain events occur.