Is it theoretically possible to build a platform that'd allow a programmer to use any language to execute certain tasks? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Is it theoretically possible to build a platform that'd allow a programmer to use any language to execute certain tasks?

For instance write a block of code that's scrapes data from the internet(in Python) then in the next block of code output summary statistics using, say, C#? From security to computing efficiency to whatever aspect.

7th Mar 2022, 3:19 PM
Senzo Lorenzo
Senzo Lorenzo - avatar
3 Answers
+ 3
Anything is possible, but question how it can be done. And if the answer is so obvious, then why noone has done it. I can say, "wouldn't it be neat if we could use coding to interact with our bodies at a molecular level?" but it really doesn't mean much unless I have a clue on how to even aproach it.
7th Mar 2022, 3:32 PM
Slick
Slick - avatar
+ 3
Are you trying to compare advantages of languages? And then compare limitations, then avoid the compromise of slow performance? Your quest for the holy grail of programming is preceded by many, I quote a great literary work: "Arthur: We have ridden the length and breadth of the land in search of Knights who will join me in my court at Camelot. I must speak with your lord and master. Guard: What, ridden on a horse? Arthur: Yes. Guard: You're using coconuts! Arthur: What? Guard: You've got two empty halves of coconut and you're banging 'em together."
7th Mar 2022, 11:01 PM
HungryTradie
HungryTradie - avatar
+ 1
Yes this happens all the time. Look into language interoperability. I used C# to invoke js code, Matlab scripts and commands, CPLEX models, and c++ binaries. I know that it is possible to do so with python just haven't found a need to do so. The connection is capable of going both ways too. For example you could have python invoke the .NET environment as well. The complexity varies from language to language. Therefore a lot of research needs to be done prior to doing such things, also the implications need to be considered. Implications like performance penalties. You can probably have C# bring up the python interpreter, however you probably don't want to keep opening and closing it every time you need it, since there will be a performance hit. Consider using a singleton to neutralise this issue. It is likely that there are more ways to have them communicate as well, which will have different strengths and weaknesses.
9th Mar 2022, 9:10 AM
Adam McGregor