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

Fix 'macroexpand' output in Chapter 8 #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix 'macroexpand' output in Chapter 8 #180

wants to merge 1 commit into from

Conversation

pyrmont
Copy link

@pyrmont pyrmont commented Jan 28, 2019

The output of calling macroexpand for the if-valid macro is shown at the end of Chapter 8. However, the output is presented as code to be input by the user rather than code that will be output (by listing it as a comment). This fixes that.

It is noted for completeness that in Clojure 1.10.0, the code as written will fail to compile. This is because the spec for macroexpand no longer allows simple symbols (such as, in this case, my-error-name). These need to be appended with a #. However, since the current edition is written for Clojure 1.9.0, fixing this would represent a more comprehensive change that is beyond the scope of this PR.

The output of calling `macroexpand` for the `if-valid` macro is shown at the end
of Chapter 8. However, the output is presented as code to be input by the user
rather than code that will be output (by listing it as a comment). This fixes
that.

It is noted for completeness that in Clojure 1.10.0, the code as written will
fail to compile. This is because the spec for `macroexpand` no longer allows
simple symbols (such as, in this case, `my-error-name`). These need to be
appended with a `#`. However, since the current edition is written for Clojure
1.9.0, fixing this would represent a more comprehensive change that is beyond
the scope of this PR.
@pyrmont pyrmont changed the title Fix 'macroxpand' output in Chapter 8 Fix 'macroexpand' output in Chapter 8 Feb 14, 2019
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

Successfully merging this pull request may close these issues.

1 participant