What about O'Caml, Haskell, C99, Ada 2005, Scheme or Lisp?
I do not think that there is any particular high level language that is suited to be another compiler's target language.
What about O'Caml, Haskell, C99, Ada 2005, Scheme or Lisp?
I do not think that there is any particular high level language that is suited to be another compiler's target language.
Google's Go would be a good language to target, I think. Go seeks to do to modern languages what C# sought to do to C++ and Java a decade ago -- improve upon it, make it "better" (in the beholder's eye).
You should also be sure that Lua is supported, which AFAIK isn't hard to do since it piggybacks upon C/C++ I think (??).
JavaScript, I'd add. Syntax like C, has lambdas, very popular, has very fast HQ implementations which compile to native code and is available everywhere. Double-plus: you can demo your compiler in any web browser and everybody is listening today, if you have something that cranks out JavaScript.
If your backend would be just plain C you wouldn't have support for several constructs of your base language, but you would gain compatibility to other languages (nearly all languages can be easyly linked to C libraries). You could write some parts of your program in your language and some parts in other languages. And its fast to compile.
Many parser generators are generating C code, so its also not uncommon.