Re: Bindings in Swift
Re: Bindings in Swift
- Subject: Re: Bindings in Swift
- From: Charles Srstka <email@hidden>
- Date: Sun, 10 Aug 2014 12:25:04 -0500
On Aug 9, 2014, at 8:44 PM, Quincey Morris <email@hidden> wrote:
> On Aug 9, 2014, at 18:13 , Roland King <email@hidden> wrote:
>
>> If this is where we are then it would be handy to have the runtime throw, or at least log, if you attempt to KVO a Swift property which isn't dynamic.
>
> Yes, though I expect (hope?) that there is eventually something better than traditional KVO/bindings/etc coming along for Swift. (Note, for example, that did/willSet takes over a little bit of the KVO universe. Just not very much.)
What would be nice to see in a KVO replacement would be some kind of markup, like an "observable" keyword, to let callers know that a given property is observable. With the current system, there's no way to know whether the property is dynamically based on some other property and whether the class is internally implementing the +keyPathsForValuesAffectingFoo methods to make the property work properly with KVO other than hoping that it's mentioned in the documentation.
Charles
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden