3 ms·
You could also take your proto-eval and spit out ASTs into your favorite language for your given special forms and bootstrap a new interpreter from there. Hy d
by agentultra 11y ago
You could also take your proto-eval and spit out ASTs into your favorite language for your given special forms and bootstrap a new interpreter from there.
Hy does this for Python (except that its initial implementation started from a parser). It essentially becomes a syntax for manipulating Python ASTs as plain old data-structures instead of classes with terrible interfaces. It's actually a great way to become intimate with the inner workings of your host language.
It's funny how far you can get by sprinkling a few parentheses around.