Wednesday, February 10, 2010

A Python VM in Go?

Python currently has three to five VMs, depending on who you talk to and how you're defining a VM. The obvious ones you will get in Eclipse are the C, Java and C# VMs.

A Go VM would of course leverage the advantages of a Go engine, while allowing continued use of Python as the API of choice.

Per studies at Michigan State, other anecdotal evidence, using Python as a "gateway language" has none of the negative connotations of "teaching language" in the sense of "you'll never see this in the real world". You'll see Java too.

PyPy and UnLaden Swallow may be added to the list. I don't know enough about Parrot to say anything intelligent about it.

To keep any of these subcultures going, students need ample time to poke around in the inherited libraries, getting their feet wet with what a language might do. Java's class library is quite vast, whether accessed natively or through Jython.

Non-programmers maybe think "a computer language" has nothing to do with "a literature", as if just knowing a few rules of syntax is all one would need to just buckle in and go. On the contrary, those few rules of syntax then gain you entre to a vast forest of goodies.

No one explores a vast forest over night though. Providing ample time for exploration is a precondition for getting any work done. Work / study is a repeating cycle.

Just because you "know English" doesn't mean you've studied Shakespeare. To each language, a literature pertains, a library. Heritage matters. Javascript, Objective C, PHP... these are APIs to tool sets, control panels to multiple engines.

Note: a VM is a virtual machine, as distinct from a library. The job of a VM is to run a lower level language generated by a higher level language as a result of an interpretive process. Both Python and Java compile to bytecode languages for runtime execution. You may distribute these bytecode files without the source if you wish, licenses permitting.