+ 2

How to combine multiple languages in a program

Sometimes someone says a program is written in more then one language. But how to do that? Is it as easy as combining HTML, CSS & JS? Or is it more complex? How does it work? https://www.sololearn.com/discuss/1249537/?ref=app

11th May 2018, 7:33 AM
Tim
Tim - avatar
3 Respostas
+ 7
As Bryant mentioned, most of the languages provide some interface to connect to other languages. For instance in Node.js you can write your own modules in C/C++ and then connect with V8 API to node.js. For other languages, it is mostly recommended to use REST APIs.
11th May 2018, 7:54 AM
Tatevkote
Tatevkote - avatar
+ 1
As far as I know, one of the best possible scenarios is the use of sockets and/or systems with publish/subscribe idiom. For most of the cases, the language itself provides some interface, for instance Java provides JNI to connect with C/C++ code. .Net framework itself makes it easy to connect multiple languages in one project via CLR/CLI.
11th May 2018, 7:45 AM
Bryant
Bryant - avatar