I was wondering today why we cannot have some platform which would allow me to call across languages. If we take a basic example and say that I want to have Node/TS and Python files in a single system - what is the most ergonomic / efficient way to do this available today?
Why is this concept not more popular? Is this a bad idea?
If this is a good idea, what do we need to improve upon what is available today?
The same pattern can be used without the web browser by writing part of the system in one language and parts in another language and having them communicate via a "web service" or similar protocol.
Some runtime environments such as the JVM and .NET support multiple languages, so there is no problem with Clojure, Java, Jython and Scala in the same runtime or F# and VB.NET.
There are also methods for making calls between different languages in the same address space, particularly I would call out
https://cffi.readthedocs.io/en/latest/
which is increasingly being used as a model for other languages. That one above makes it very easy to call C functions from Python. When you do this though you run into problems which are sometimes subtle and sometimes not subtle. For instance I worked on a system which combined C++ with Java and used JNI for interoperation. The worst problem I ran into was that you could not use C threads. I also ran into the problem that the gdb debugger would always be catching segmentation faults from the Java runtime because segfaults in Java are a routine condition. So it took some configuring gdb to get into a place where I could run gdb and jdb on the same process at the same time so I could debug both the Java and C++ sides of the system at the same time.
Note there is more to it than just having a way to share access to functions and data, you also will need answers for how you will handle dependencies, do builds, run unit tests, run an IDE, for each environment.
https://en.wikipedia.org/wiki/List_of_JVM_languages
https://www.graalvm.org/22.2/graalvm-as-a-platform/language-...