Re:Create your own Game Engine but don't use it
by yellowapple on Thursday July 13, 2017 @12:37PM
(#14762735)
A growing number of languages are ABI-compatible with C. A small but significant subset of those languages is ABI-compatible with C++. Quite a few languages (Perl 6, Julia, Tcl w/ critcl, pretty much everything that uses libffi AFAICT) are able to do this without having to write full-blown wrappers for a whole C/C++ library (though you still need to wrap specific functions in most cases).
[ Parent
| on HN ]
Re:Create your own Game Engine but don't use it
by ihnorton on Thursday July 13, 2017 @01:00PM
(#14762938)
Julia JIT compiles C calls via LLVM, so there's no libffi performance overhead (similar to LuaJIT's CFFI, though that does not use LLVM).
Re:Create your own Game Engine but don't use it
by yellowapple on Thursday July 13, 2017 @04:48PM
(#14765071)
Neither does Tcl's critcl AFAIK (I think it just sticks the C code in a Tcl extension and compiles it using the system compiler). My intent there was just to list cases where wrapping a whole C/C++ library is unnecessary, not to imply that Julia uses libffi :)
On that note, LLVM helps a lot here, too. Are there any LLVM-based languages that don't have some degree of C compatibility?