[OT] code is data
anton.vredegoor at gmail.com
Sat Jun 17 14:46:08 CEST 2006
With the inclusion of ElementTree (an XML-parser) in Python25 and recent
developments concerning JSON (a very Pythonesque but somewhat limited
XML notation scheme, let's call it statically typed XML) Python seems to
have reached a stage where it now seems to be possible to completely
swallow lesser languages code, modify it, and spit out new source code
targeting the original language the code was written in, or even make a
translation to other languages.
The idea is that we now have a fast parser (ElementTree) with a
reasonable 'API' and a data type (XML or JSON) that can be used as an
intermediate form to store parsing trees. Especially statically typed
little languages seem to be very swallow-able. Maybe I will be able to
reimplement GFABasic (my first love computer language, although not my
first relationship) someday, just for fun.
Then there are things like cTypes (calling functions from native DLL's)
and PyPy (implementing Python in Python).
All this taken together, to me it starts looking like we're now entering
a territory that traditionally was exclusively in the Lisp domain.
Yes, Python had eval and exec for a long time already, and metatypes and
generators are having some strange unexplored possibilities too, but the
day will come soon (and at last when PyPy is reaching execution speeds
close to cPython) where Python will be able to swallow smaller
languages, and finally it will be able to swallow its own tail, like
Lisp but then more powerful (because of the widely used standard data
types and the code exchange between languages that that makes possible).
Your thoughts please.
More information about the Python-list