0
How to write a program that itself write and execute program?
2 odpowiedzi
+ 3
What you describe is generally referred to as 'metaprogramming'. And usually, for everyday tasks, it's not worth bothering with, because it adds a whole new level of abstraction that can make your program much more difficult to understand and debug.
However if you are willing to put in the effort, you can gain a deeper understanding about the inner mechanics of the language.
Related to Python this is your source to study: https://realpython.com/python-metaclasses/
+ 1
Here is an example of how a C++ program can write and execute a FORTRAN program on SoloLearn.
https://code.sololearn.com/cSFgwWBqPAWy/?ref=app