> On 28. Oct 2017, at 23:10, Chris Lattner via swift-evolution > <swift-evolution@swift.org> wrote: > > … which is to say, exactly identical to the Python version except that new > variables need to be declared with let/var. This can be done by blessing > Python.Object (which is identical to “PyObject*” at the machine level) with > some special dynamic name lookup behavior: Dot syntax turns into a call to > PyObject_GetAttrString, subscripts turn into PyObject_GetItem, calls turn > into PyObject_Call, etc. ARC would be implemented with INCREF etc.
That sounds like a very interesting prospect. Do you think it would make sense to make the language features that facilitate this (dynamic dispatch of method calls, property accesses, subscript and ARC) available to Swift classes annotated in some way, so that interop like this can be implemented as a library without special treatment by the Swift compiler? This could also enable more dynamic DSL like features. — Lukas
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution