On Sat, May 14, 2005 at 03:10:50PM +0300, Yaroslav Fedevych wrote:
Hmmm, think Lisp macros...
Actually, if I had to pick a language to use as an ur-language (I always thought the term was "ur", not "er"), I'd probably go with either Perl or some Lisp variant. I'm not the world's greatest programmer (yet), though, so I might think this for all the wrong reasons.
I sure as heck wouldn't do it in XML, though.
It seems to me that a problem with using some meta-language like this for writing code that can be exported/translated to many languages would be that you could only effectively produce a limited subset of each of those other languages. The characteristics of various languages are different enough from one another that you'd never have enough time to write any kind of translation routines to produce the full range of possible code in other languages. If, by some miracle, you actually DID manage to do such a thing, the resulting meta-language would be better used as a primary language itself: write stuff in that language, then compile or interpret it as needed, and skip the intermediate step of translating into some other programming language.
. . . and we arrive back at the question of how to create the "perfect" programming language, which most reasonable people seem to have discarded as a useless debate. Feel free to prove me wrong, though. If you can create such an all-powerful meta-language that will allow writing code in C, Perl, PHP, Python, and Smalltalk, all without knowing any of those languages, I really think you should. I'd love to see such a thing, and would happily learn it, especially if it means people will stop trying to convince me to learn Python.
Of course, for our purposes, a meta-language might not need to do that much. I guess the trick would be in figuring out what we actually DO need it to do.
-- Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]