[swift-evolution] Python Interop with Swift 4+

Chris Lattner clattner at nondot.org
Wed Dec 6 11:04:38 CST 2017


For anyone interested, here’s another update on this, including a bunch of operators, conformances to standard Swift protocols etc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PythonInterop.playground.zip
Type: application/zip
Size: 28706 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171206/9103f31e/attachment.zip>
-------------- next part --------------



-Chris


> On Dec 1, 2017, at 12:50 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Here’s an updated version of this: Most importantly, I found through the implementation effort for DynamicMemberLookupProtocol that it is better for PyVal to be a struct than it is for it to be an existential.  This implementation shifts the design to that center of gravity, which makes a lot of things feel more natural:
> 
> <PythonInterop.playground.zip>
> 
> 
> There are still lots of open design topics: I’ve listed a few at the bottom of the tutorial page.  This playground is tested with unmodified Xcode 9.
> 
> -Chris
> 
> 
>> On Nov 19, 2017, at 6:16 PM, Chris Lattner <sabre at nondot.org> wrote:
>> 
>> Hi all,
>> 
>> As I mentioned on a couple other threads, I’ve been working on improving Swift interoperability with Python.  I have two pitches out: one to improve Python member lookup and one to improve calls to Python values.  While those proposals are important, I think it is also useful to see what can be accomplished with Swift today.
>> 
>> To show you how far we can get, here is a Swift playground (tested with Xcode 9) that has an example interoperability layer, and a tutorial for using it.  If you’re interested in the pitches, or in Python, please check it out:
>> 
>> 
>> In addition to showing how far the interop can go today (which is really quite far) it shows what the future will look like assuming the member lookup and call issues are resolved.  To reiterate what I said on the pitch threads, I am not attached at all to the details of the two pitches themselves, I simply want the problems they address to be solved.
>> 
>> Finally, of course I also welcome questions and feedback on the actual approach, naming, and other suggestions to improve the model!  Thanks,
>> 
>> -Chris
>> 
> 
> _______________________________________________
> 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