On Jan 1, 2016, at 5:00 PM, Jared Sinclair via swift-evolution 
<swift-evolution@swift.org> wrote:
> The one-to-many observer pattern could really use a first-party, native Swift 
> solution. The day-to-day practice of writing iOS / OS X applications needs 
> it, and we end up falling back on antiquated APIs like KVO or 
> NSNotificationCenter, or short-lived third-party libraries. This is an 
> essential need that deserves a fresh approach.

Hi Jared,

I agree with your motivation, but I can’t see us having time to take this on in 
the Swift 3 timeframe.  There is a huge potential design space here, and KVO 
has some significant sub-optimalities in its design - only one of which is that 
notifications often get delivered on the “wrong” thread.

It is pretty likely that we’ll get property behaviors in the Swift 3 timeframe, 
and that may enable some KVO like systems to be built.  However, I doubt we 
would standardize and include a KVO system in the Swift 3 timeframe because of 
the short timeframes involved.  Also, I’m very hopeful that we’ll be able to 
tackle concurrency in Swift 4, and making these two features mesh well seems 
really important.

That said, feel free to start hacking on the compiler to prototype your ideas!

-Chris

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to