-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add gensym and clean or
macro
#143
Conversation
Overall looks good so far. I would probably leave the core.mal loading and "->" test in step8 to keep them with the macro step and then just drop the "and" tests. I had been thinking for a while to reduce the "and" tests. Slow implementations are especially slow with macros and the "and" macro is so similar to "or" macro that the tests for it are fairly redundant. If anything, one or two tests for "->>" in step8 would be more useful since that is a more complex macro. |
OK, sounds good, I'll restore core.mal back to step8 and replace |
1. `gensym` isn't yet available in step8 2. `and` tests are very slow in some implementations 3. ->> macro is more complex 4. moved core.mal to the end so it won't override the builtin `or` macro
* go * guile * js * mal * miniMAL * ocaml * ps * python * racket * ruby * tcl * vimscript
* bash * c * clojure * coffee * crystal * d * elixir * erlang * forth * lua * make * nim * perl
* awk * cpp * cs * es6 * factor * fsharp * groovy * haskell * java * julia * kotlin * matlab * php * r * rpython * rust * scala * swift * vb
As far as I can see all implementations pass the soft test at the end of test A which tests |
Add gensym and clean `or` macro
Nice work. |
Add gensym and clean `or` macro
Add gensym and clean `or` macro
(Following discussion in #126)
This PR introduces
gensym
in the optional stage of stepA, implemented in Mal itself (part of therep
calls at the beginning of the program), and a cleanor
macro which doesn't shadow caller bindings.There are separate commits for changes in tests, process, guide, core.mal, and then one commit which modifies the actual stepA code of 12 implementations (all pass the new tests of stepA).
If this looks good, I'll continue implementing the change on the rest of the implementations.