3 ms·
Wait... Isn't this just an implementation of lisp in python? It's not a homoiconic version of python as the title sugests, right? Or am I missing something?
by Garlef 2y ago
Wait... Isn't this just an implementation of lisp in python?
It's not a homoiconic version of python as the title sugests, right?
Or am I missing something?
- matheusmoreira 2y agoLooks like it. I was curious to witness this homoiconic Python but I'm not sure it's even possible. For that to be true, Python syntax would have to be made out of tuples, lists or dictionaries, and the interpreter would have to evaluate those directly.
- 3abiton 2y agoWhat is the difference?
- xaellison 2y agoThe whole point of homoiconicity is that a language (lisp) is implemented in itself. This is lisp implemented in python (not itself).
- Zamiel_Snawley 2y agoI thought the point of homoiconicity was essentially runtime reflection and evaluation of programs constructed at runtime, i.e. code is a first class datatype in the language. I don't think these properties imply much about the underlying implementation of the language.
- evanjrowley 2y agoYou would be correct according to Greenspun's 10th Rule: https://en.m.wikipedia.org/wiki/Greenspun's_tenth_rule https://en.m.wikipedia.org/wiki/Greenspun's_tenth_rule
- dj_mc_merlin 2y agoYep. I also got really excited thinking this is homoiconic python I might be able to make my coworkers use (without having them buy into lisp). But no, it's just lisp.
- gus_massa 2y agoYou may want to take a look at Rhombus, that is a somewhat-python-like language with macros that is written in Racket. > Rhombus is an experimental, general-purpose programming language with conventional expression syntax that is built on Racket and that is macro-extensible in the same way as Racket. It's still work in progress, but you can install and run the prototype. I recomend to take a look at the "demo" file with examples https://github.com/racket/rhombus-prototype/blob/master/demo.rhm https://github.com/racket/rhombus-prototype/blob/master/demo... Or read the docs https://docs.racket-lang.org/rhombus/index.html https://docs.racket-lang.org/rhombus/index.html , in particular an overwiew in https://docs.racket-lang.org/rhombus/Modules.html https://docs.racket-lang.org/rhombus/Modules.html and some examples of macros in https://docs.racket-lang.org/rhombus/expr-macro.html https://docs.racket-lang.org/rhombus/expr-macro.html .
- deleted 2y ago[deleted]