A universal programming language?30 Jun 2010
A random thought popped into my head not so long ago: What if we had a universal language that integrated all the common programming language syntaxes, integrating the binaries, engines and function calls for each of them, allowing anything to be written in any language in each file?
.NET made huge progress allowing a single project to be coded with different languages, at file-level of course. But what if we could use several languages in a single file?
I know this would probably represent a heavy strain on the processing part of it, but for web-based technologies it would be an interesting approach. Just imagine, Rails+PHP+Python+Java, a world where we can truly live together. Or not?
Take the following code as an example:
> cout << "Hello world" << endl; > echo "This is a test"; > System.Windows.MessageBox("And another test"); > print "Just for the sake of it"
I had a talk with a programmer about a month ago, and we obviously reached the conclusion that it would be too bloated and problematic to manage. However, an engine that can handle maybe 2 or 3 languages would be rather interesting. I’d be happy enough to get C#/VB (ASP.NET) + PHP + Ruby.
Assuming you can keep it clean, and standards are adopted, I think it would be great. Things might be simpler in certain languages than in others, and sometimes it would certainly be reflected in the amount of lines as many languages implement built-in functions that perform many tasks with a single line of code.
On the other hand, it could become programming hell, but I’d be interested if such a thing existed, for the mere purpose of having fun. What do you think? Would it be “programming hell”? or does it actually sound viable?