Hacker News new | past | comments | ask | show | jobs | submit login

That's because the representation of that AST seems to be defined in terms of Python's objects, so it looks unwieldy.

Compare with Lisp:

Code: x

AST: x

Code: (let ((x 5)) (+ x x))

AST: (let ((x 5)) (+ x x))

And as for the very little syntactic sugar most Lisps have:

Code: 'x

AST: (quote x)

:).




Ah, that helps a lot--thanks for the example! Most ASTs I've have seen look much more gruesome than that. That AST looks straight delightful.

(actually now that I think about it, R may do something a bit similar)


And we can map Cirru AST to a language AST like I did in http://script.cirru.org/ ;)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: