Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify The Language through removing custom binders #30

Open
mariari opened this issue Jun 19, 2022 · 0 comments
Open

Simplify The Language through removing custom binders #30

mariari opened this issue Jun 19, 2022 · 0 comments
Labels
enhancement New feature or request research Things to lookup and research

Comments

@mariari
Copy link
Member

mariari commented Jun 19, 2022

I thought of a really good trick that should simplify the alucard compiler quite a bit.

Currently I do some hacks to get around the fact I can't use CL's let. I have my own version def.

however what if, when I create a term of the language, instead of just creating it.

What if I gave each an unique object number, and thus when it gets duplicated

(let ((foo (+ 2 3)))
  (+ foo foo))

We can know the user really let it.

Thus I can have a pass that redoes the let with some basic analysis.

We can remove def from the language with this change in!

Note that we still have to emit to a real body as if a user writes

(progn
   (+ 2 3)
   (* 3 5))

the (+ 2 3) would get thrown away, if the (+ 2 3) does not emit, This means that we will likely lose information that our current strategy works with.

@mariari mariari added enhancement New feature or request research Things to lookup and research labels Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request research Things to lookup and research
Projects
None yet
Development

No branches or pull requests

1 participant