Language independent – runnable pseudocode?

I tried to identify existing technologies for the following ideas:

1) The user types a language called (insert_name_here) in some code;

2) The user selects the target language from the well-known output candidate list (JavaScript, ruby, Perl, python);

3) The processor will insert_ name_ The runnable code from here to the target language;

4) The processor then runs the code using related system calls based on the selected language

The reason for this is because from insert_ name_ There is a pre - established 1 - to - 1 mapping between all language structures from here to all supported target languages

(Disclaimer: obviously, this will not produce "elegant" code tailored to the target language. It is only a basic translation that can be run. The purpose is to allow developers to quickly implement the algorithm. There are several different languages for those cases where they do not want to reinvent the wheel, but for any reason, they need to use the specific language of a specific project.)

Does this already exist?

Solution

There are converters for different languages The problem you will encounter is the processing library Although the mapping between language statements may be easy, it will be very difficult to find the mapping between library functions

I'm not sure how useful that type of code generator would be Why do you write something in one language and immediately convert it into something else? I can see the basic principles of the fourth generation language that converts diagrams or models into code, but I don't really see the focus of your efforts

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>