| ▲ | cestith 8 hours ago | |||||||
Somewhere in the continuum from SWIG through XS and on to Platypus there are also the Inline modules these days. They allow one to put inline sections of other languages into Perl code the way many language tools used to allow one to inline assembly into C or Pascal code. There are some of these modules for other languages than those listed here, a lot of them as high level as Perl (including Raku and even another Perl system for some reason). https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod https://metacpan.org/dist/Inline-ASM/view/ASM.pod https://metacpan.org/dist/Inline-CPP/view/lib/Inline/CPP.pod https://metacpan.org/dist/Inline-CPR/view/CPR.pod https://metacpan.org/pod/Inline::Lua https://metacpan.org/dist/Inline-Java/view/lib/Inline/Java.p... https://metacpan.org/pod/Inline::Guile https://metacpan.org/dist/Inline-SLang/view/SLang.pod There are even tools to convert from Inline to XS for C and C++. https://metacpan.org/dist/InlineX-CPP2XS/view/CPP2XS-Cookboo... | ||||||||
| ▲ | autarch 8 hours ago | parent [-] | |||||||
True. For whatever reason, these never displaced XS. For wrapping C libraries in particular, it's not clear to me how much Inline::C helps with this. You're still stuck using a lot of Perl C API calls, AFAICT, which I think is the biggest challenge of using XS (I still have nightmares from trying to figure out where and when to add `sv2mortal` in my XS code). | ||||||||
| ||||||||