[OT] code is data

bruno at modulix onurb at xiludom.gro
Mon Jun 19 04:24:49 EDT 2006


Anton Vredegoor wrote:
> 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)

JSON stands for JavaScript Object Notation, and has *nothing* to do with
XML - except for the fact that it's more and more used instead of XML
for AJAX stuff.

> 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.

If you mean "parsing source in a given format and outputting another -
modified or not - representation, in the same or another format", Python
as always been able to do so.

> 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.

Sorry, but I just don't get the point. Parsing, working with trees and
calling native code are in no way "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

I'm afraid Python is still very far from Lisp - and will never get there
(FWIW, this seems not to be the goal anyway).

> (because of the widely used standard data
> types and the code exchange between languages that that makes possible).

I still don't get the point.

> Your thoughts please.
> 
> Anton


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list