On Sun, Feb 21, 2021 at 10:02 AM Dan Stromberg <drsali...@gmail.com> wrote:
> > It looks like CPython remains 100% C, so clang becomes more attractive: > > https://stackoverflow.com/questions/6329688/llvm-and-visual-studio-obj-binary-incompatibility > > Then again, do we allow C++ extension modules? That might make C++ more > relevant, even if CPython itself is purely C. > Extensions can easily be built in any language, C++ is even documented, and I've built a simple one in Rust when I was learning it -- as long as you use the equivalent of extern "C" { } for that language, or rebuild the headers you need in another language (quite an undertaking, admittedly, even with a header parser). The line "You will still need the C compiler that was used to build Python; typically Microsoft Visual C++." hasn't been accurate in a long time either (it's been in there since Python 2.2, when VC++ 6.0 was the latest, which had quite a few... quirks), anything that can digest the headers can link via the C API just fine. I guess since it's just not tested or supported, so you're on your own if you run into any issues with memory management, threading conflicts, compiler bugs, header conversion issues, etc. -Em
_______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/7VLV5LCW7XL2OILMVS57WDWDGDU5O765/ Code of Conduct: http://python.org/psf/codeofconduct/