Python syntax in Lisp and Scheme

Paul Rubin http
Fri Oct 3 12:21:07 EDT 2003


Oren Tirosh <oren-py-l at hishome.net> writes:
> Implementing Python-like syntax in LISP or even a full Python 
> implementation in LISP would be a worthwhile goal (LPython?). BTW, this 
> kind of implementation is one of the relatively few programming tasks 
> that can benefit greatly from macros. The Python semantics can be mostly
> done using macros and a preprocessor would translated Python syntax to
> s-expression code that uses those macros.

If done straightforwardly, the language semantics would end up
different from Python's in a few ways.  For example, strings in most
Lisp systems are mutable.  Also, Python's class system doesn't map
onto Lisp all that well; Python's variable-scoping rules are bizarre,
and so forth.  I think the result would still be worth doing but 
it would be a further departure from CPython than, say, Jython is.




More information about the Python-list mailing list