Search code examples
code-generationportabilityuniversalportable-applications

Universal meta-language for "simple" programs


I realize that it is impossible to have one language that is best for everything.

But there is a class of simple programs, whose source code looks virtually identical in any language.

I am thinking not just "hello world", but also arithmetics, maybe string manipulation, basic stuff that you would typically see in utility classes.

I would like to keep my utilities in this meta-language and have it automatically translated to a bunch of popular languages. I do this by hand right now.

Again, I do not ask for translation of every single possible program. I am thinking a very limited, simple language, but superportable.

Do you know of anything like that? Is there a reason why it should not exist?


Solution

  • Check Haxe, and its Wikipedia page. It's open source and its main purpose is what you describe: generating code in many languages from only one source.