New answers tagged

0

You probably don't want to use something like LLVM for your use case. It is an extremely flexible IR, which means you will end up having to implement a bunch of stuff you don't really need, just to get it to work. If you had to be able to run any arbitrary existing C program on your assembly language, then it would be worth it. Parsers aren't really that ...


0

The limit is that a particular combination must be popular enough so that someone can be bothered to implement it. I’m quite sure it is possible to build something that lets you call FORTRAN code from Swift, and I’m also quite sure that nobody will be bothered doing it. Another limitation is that parameters and return values of functions in the called ...


4

how many more programming language could be attached to this - is there limit? There is no limit. You can use as many programming languages in a single program as you want. Using more than one language in the same project (but not necessarily the same program) at the same time is called Polyglot Programming. There is even a programming paradigm called ...


2

This mechanism is called a Foreign function call. Pretty much all major programming languages can do it, though the ease of use of a foreign function call differs between each pair of languages implementations. Python itself for example has ctypes in the standard library and a third party library cffi that allows it to call into any C code, and other ...


2

Many programming languages contain a foreign function interface (FFI), or language bindings as it can also be referred to. There are many native libraries developed for use with Python, Ruby, etc. Here are a few examples: Go Python Ruby Rust There are also projects such as SWIG, Simplified Wrapper and Interface Generator, which can generate these for you.


Top 50 recent answers are included