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

Just a suggestion - re-write some special forms as macros? #403

Open
jpellegrini opened this issue Jun 23, 2022 · 1 comment
Open

Just a suggestion - re-write some special forms as macros? #403

jpellegrini opened this issue Jun 23, 2022 · 1 comment

Comments

@jpellegrini
Copy link
Contributor

Hi @egallesio !

I was looking at the compiler, and thought of something. STklos' compiler is already quite compact (which is great!), and maybe it would be possible to rewrite some of the special forms as macros over others? Is there a bootstrap / chicken-and-egg problem with that?
For example, cond expanding as code using ifs, and do, which could be rewritten as letrec...
If you think this is a good idea, I could try doing that.

@jpellegrini
Copy link
Contributor Author

Update: I tried moving do and cond from the compiler and including them as macros in runtime-macros.stk, but theis breaksbb.stk and STklos won't compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant