Hey Jason,
On 10/19/20 3:11 PM, Jason H wrote:
So as it turns out, Swift allows for interop with C ( https://developer.apple.com/documentation/swift/swift_standard_library/c_interoperability ). C++ is not high on the list of Swift enhancements, but it's been requested, however there is no timeline or commitment. 1. There is some risk that in the future Apple releases a Swift-only library for a desirable feature. 2. There is the immediate situation that Swift is just better code than Objective-C and the code examples are more plentiful online and there is some value of being able to use Swift today. Given those two factors, my question is if Shiboken could be adapted to auto-generate the C++/C, C/Swift bindings to be able to use Swift in a Qt project?
Without going into too much history, Shiboken was originally inspired on the generator behind Qt Jambi, so it would be possible to extend or change the functionallity to support other languages. The main issue, is that during the past years, Shiboken has been modified and improved towards a better CPython code generation and options to the typesystem has been added just to deal with the ownership of object, Python's default variables, etc. I have no idea of Swift, but I do believe it's certainly possible, however there is no plans from the Qt for Python project to extend it to other languages, and I'd expect to get some contributions from the community to make some aspects more "generic" or maybe improve the possibility to include new languages. If you would like to lead that effort, maybe you could open a Suggestion or User story on JIRA with some general ideas, suggestions, material, motivation and more, so anyone could take that as a starting point. Cheers -- Dr. Cristián Maureira-Fredes R&D Manager The Qt Company GmbH Erich-Thilo-Str. 10 D-12489 Berlin Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B _______________________________________________ PySide mailing list PySide@qt-project.org https://lists.qt-project.org/listinfo/pyside