Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If this thing supports macros (and it seems to, see the pipe example in the tutorial), it may be more powerful than Python — as you'd expect from a Lisp.


It supports macros. It's a lisp-1 and they're not hygienic... but you can hack away with them.


and symbols are just strings... that makes writing macros nearly impossible. CL doesn't need hygenic macros since two symbols with the same name from different packages are not the same it's hard to accidentally shadow someone else's definitions.

P.S. The lisp-1 nature of scheme isn't why hygenic macros are important there, it's really a bit of a red-herring, since macros in common-lisp can (and do) use (flet) and (labels)


I wouldn't say it's impossible but one should be aware of the issues. And we can always use more contributors to help make it better.

Hy isn't trying to be CL or Scheme. It is still after all, Python. However a homoiconic front-end to Python has interesting implications for a language like Python. Macros in Hy are almost like a template language for Python ASTs. You could replace the namedtuple implementation with a Hy macro. If Python didn't have a `with` keyword you could implement it as a Hy macro. I'm sure there may be more.

Python's not a lisp under the hood. However it does benefit from some of the superficial features of a homoiconic transpilation. :) </cheeky>




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: