2011/12/13 Timothy Baldridge <[email protected]>:
> For some time now, I've been working on my Clojure/pypy
> implementation. However, I'm starting to wish I had a few Clojure
> facilities while writing my rpython clojure interpreter. Basically I
> would love to have macros, protocols, symbol resolution, and a ton of
> other little features for helping with run-time code generation and
> the like.
> So this is when I started thinking about generating python code from
> Clojure source. That is, in Python we have a AST, and in Clojure we
> can parse LISP lists and convert them to AST constructs. This is when
> I started to realize where Python falls short of the flexability of
> Clojure in a few key areas:
> 1) multiline closures (lambdas with more than one statement)2) IfExpr
> with multiline bodies.
> I tried working with the ast module in Python 2.7...and it's horribly
> restricted. I found a old lib from PEAK that does what I want
> (BytecodeAssembler) but it's fairly old, and no longer supported. So
> this is when I thought of the ast in /pypy/interpreter/astcompiler/
> Does the pypy interpreter support non-standard constructs like IfExpr
> with a multiline body? And if not, could it be adapted to support
> this?

No and naturally yes.

> I'd rather not drop all the way to emitting Python bytecode...

Uh, so what are you doing with the Python AST then?


-- 
Regards,
Benjamin
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to