+ 1
Combining language
is it possible to combine two programming languages at a time?
12 Respuestas
+ 7
It is totally possible, through some modules in Python:
https://wiki.python.org/moin/IntegratingPythonWithOtherLanguages
But for example you can mix Python with SQL in Sololearn:
https://code.sololearn.com/csyhsIovmZJ3/?ref=app
+ 5
Daniel Holmes No problem, the question was vaguely poised anyway :)
I give a rest to SQL case as well -- let them historians solve it one day ;)
+ 4
Daniel Holmes I don't think the question was that specific...
Anyway, sure those are translators, but how else would you be able to run it?
By the way, Jupyter Notebook allows you to insert C++, Java and even Scala snippets from within the Python kernel.
Oh, and SQL is a programming language alright. Why wouldn't it be?
+ 3
Bebida Roja, this is not exactly what the author asked, I think. You have a separate python script and a separate C ++ code. And you can call the script on python in C ++ code. But you cannot combine these 2 languages in one project and compile them into one assembly.
+ 1
It's not possible here on SoloLearn but there are way to execute java code in a website (on the server side) for example. But they can't stay in the same file
+ 1
I needed to make a program that parses some file and then do some processing, and I used C++ for the processing and python for the parser. it was so much easier
+ 1
thank you everyone...
+ 1
Kuba Siekierzyński, SQL isn't programming language. You can say same about PHP and HTML, but html isn't a programming lang. too
+ 1
Kuba Siekierzyński, What you are talking about is a different implementation of translators for python. it does not give you the opportunity to write 1 project simultaneously in python and c ++ and compile it as a whole
0
it's impossible. One code file contains only 1 programming language, since It is difficult to make a compiler that will parse the file by languages.
But you can create 2 separate projects in different languages, one of them can launch another, transfer some data to it and receive a response.
0
Daniel Holmes Yeah, i misunderstood it...
0
Kuba Siekierzyński, if you use the correct interpretation of the term "programming", then you do not programming in SQL, but write structured queries. About the rare special cases of such a mixture of languages I agree with you. I think we initially understood the autor's question differently. I apologize if i don't understand you.