NSKeyValueCoding and the Swift Foundation

Hi everybody,

it came to my attention that the NSKeyValueCoding protocol which is a part of the Darwin-(ObjC-)Foundation (see Apple Developer Documentation ) is somehow omitted here: swift-corelibs-foundation/Status.md at main · apple/swift-corelibs-foundation · GitHub

Was this done on purpose or is the implementation of NSKeyValueCoding still forthcoming?

Thanks,

  Lars

Both KVC and KVO require dynamic dispatching and selector manipulation that is not present in swift-corelibs-foundation (since everything is based on swift objects).

···

On Jun 12, 2016, at 10:54 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hi everybody,

it came to my attention that the NSKeyValueCoding protocol which is a part of the Darwin-(ObjC-)Foundation (see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/ ) is somehow omitted here: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md

Was this done on purpose or is the implementation of NSKeyValueCoding still forthcoming?

Thanks,

  Lars

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

To my understanding the real reason why this is currently not possible is rooted in the limitations of struct Mirror, which, for instance, lacks the support for writing and the reflection of methods.

So it boils down to the following: Are there currently any plans to extend the capabilities of struct Mirror to support better reflection?

Trying to answer this question I found this post:

https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20151214/000512.html

where Joe Groff says there is something planned.

Are there any news on this, maybe a rough timeframe or Swift version for which to expect better reflection support?

Thanks,

  Lars

···

Am 12.06.2016 um 20:40 schrieb Philippe Hausler <phausler@apple.com>:

Both KVC and KVO require dynamic dispatching and selector manipulation that is not present in swift-corelibs-foundation (since everything is based on swift objects).

On Jun 12, 2016, at 10:54 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hi everybody,

it came to my attention that the NSKeyValueCoding protocol which is a part of the Darwin-(ObjC-)Foundation (see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/ ) is somehow omitted here: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md

Was this done on purpose or is the implementation of NSKeyValueCoding still forthcoming?

Thanks,

  Lars

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

I have to agree with comments found at the link in this email about swift and entry level. I am a new developer just finishing school…in school we were barely getting into objective c when swift was released. From what I’ve been told, the agreement between schools and Apple doesn’t allow schools to teach how to code in-app purchases. Ive gotten no real help from Apple developer support, found ONE video on youtube I’m still trying to make work. How does this help Apple OR people who have made the investment in Apple devices and school to learn to develop FOR Apple?? Why is Apple so unsupportive??

···

On Jun 25, 2016, at 8:27 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

To my understanding the real reason why this is currently not possible is rooted in the limitations of struct Mirror, which, for instance, lacks the support for writing and the reflection of methods.

So it boils down to the following: Are there currently any plans to extend the capabilities of struct Mirror to support better reflection?

Trying to answer this question I found this post:

[swift-users] Reason for Swift not having readwrite reflection

where Joe Groff says there is something planned.

Are there any news on this, maybe a rough timeframe or Swift version for which to expect better reflection support?

Thanks,

  Lars

Am 12.06.2016 um 20:40 schrieb Philippe Hausler <phausler@apple.com>:

Both KVC and KVO require dynamic dispatching and selector manipulation that is not present in swift-corelibs-foundation (since everything is based on swift objects).

On Jun 12, 2016, at 10:54 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hi everybody,

it came to my attention that the NSKeyValueCoding protocol which is a part of the Darwin-(ObjC-)Foundation (see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/ ) is somehow omitted here: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md

Was this done on purpose or is the implementation of NSKeyValueCoding still forthcoming?

Thanks,

  Lars

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

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

Hi Lars,

Unfortunately, I don’t think there is anything planned for Swift 3 in this area. Beyond that we just don’t have any concrete information yet.

This is a pretty big topic, so it’s likely we’ll need to have some extended design discussions about what reflection or runtime dynamism in general looks like in Swift in the future. KVO/KVC take advantage of a huge number of dynamic ObjC features, and Mirror is not even remotely capable of most of it right now. Mirrors were designed for debugging support.

- Tony

···

On Jun 25, 2016, at 6:27 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

To my understanding the real reason why this is currently not possible is rooted in the limitations of struct Mirror, which, for instance, lacks the support for writing and the reflection of methods.

So it boils down to the following: Are there currently any plans to extend the capabilities of struct Mirror to support better reflection?

Trying to answer this question I found this post:

https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20151214/000512.html

where Joe Groff says there is something planned.

Are there any news on this, maybe a rough timeframe or Swift version for which to expect better reflection support?

Thanks,

  Lars

Am 12.06.2016 um 20:40 schrieb Philippe Hausler <phausler@apple.com>:

Both KVC and KVO require dynamic dispatching and selector manipulation that is not present in swift-corelibs-foundation (since everything is based on swift objects).

On Jun 12, 2016, at 10:54 AM, Lars Sonchocky-Helldorf via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hi everybody,

it came to my attention that the NSKeyValueCoding protocol which is a part of the Darwin-(ObjC-)Foundation (see https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Protocols/NSKeyValueCoding_Protocol/ ) is somehow omitted here: https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md

Was this done on purpose or is the implementation of NSKeyValueCoding still forthcoming?

Thanks,

  Lars

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

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