Why is this needed? Partly because parts of linguistic capabilities are outside Turing equivalence. Turing Equivalence says that all complete Turing languages ββ(including most programming languages) can calculate the same things. This means that you can do it in one language, which you can do in another, with a few important caveats.
Key warnings include
a) It might be a lot harder to write code to execute x in language A and then language B.
b) Code that x in language B may be faster than language A.
c) The code for executing x may already be written as a good library in language A, but not in language B.
d) Code in one language may be more scalable (easier to manage large bodies of code), and then in another language.
e) Usually you need to not only perform mathematical calculations, but also input / output with local files, databases, network files, web services, gui, including the window system server and, possibly, toolkit, and access to the 3d api that controls the graphic by card.
These reasons, especially e, describe why you might want to bind / wrap a piece of code, often written in a lower-level system language, to use as part of an application written in a higher-level language. Linking code fragments written in different languages ββcan also sometimes be done through code exchanges, such as databases / process communication / web services.
Roman A. Taycher
source share