[swift-evolution] Smart KeyPaths

Charles Srstka cocoadev at charlessoft.com
Mon Mar 20 22:01:32 CDT 2017


Ah, yes, that would be annoying if editing .xib files caused SourceKitService dialogs to pop up every five seconds, the way editing .swift files does.

Charles

> On Mar 20, 2017, at 9:39 PM, Kenny Leung via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Wouldn’t this require the Swift compiler and the original binary to work properly?
> 
> -Kenny
> 
> 
>> On Mar 20, 2017, at 6:52 PM, Ricardo Parada <rparada at mac.com> wrote:
>> 
>> That is very interesting: "formatting templates that are well typed."
>> 
>> Would that be like a template and keypaths that were archived to a file, similar to a .nib file?
>> 
>> 
>>> On Mar 20, 2017, at 7:28 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
>>> 
>>> 
>>>> On Mar 20, 2017, at 4:01 PM, Kenny Leung via swift-evolution <swift-evolution at swift.org> wrote:
>>>> 
>>>> Hi All.
>>>> 
>>>> I’m not sure I’m understanding this proposal properly. In (old) Cocoa, two places where key paths were used extensively was EOF/CoreData, and WebObjects. I’m wondering how Smart KeyPaths will solve these two problems:
>>>> 
>>>> 1. fetching data from a database and stuff it into objects that are not known at compile time (since you’ve written the framework ahead of time)
>>>> 
>>>> 2. Token replacing text in a template, like ${person.firstName}
>>>> 
>>>> Will there be some conversion of key paths to/from strings?
>>> 
>>> There won't be a conversion from strings in this initial proposal. That would be a reasonable thing to add later. For the use case of formatting strings, hopefully, there'll eventually be some way to build formatting templates that are well-typed instead of relying on parsing strings at runtime.
>>> 
>>> -Joe
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list