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
Require that macro literals always be bound. #55
Comments
I don't like it, but on the other hand this would have saved me from typos like a million times. |
I spent a lot of time last night finding a bug which is caused by a typo: |
Hell, I'm tempted to go further and require that template identifiers always be bound with |
I'm confused when
both |
If I understand everyone correctly, I'm seeing three topics here -- all of which I agree are issues -- which have little relation with each other. They're related only by the fact they're all about silent defaults for unbound identifiers and they all have to do with DSLs for macro writing.
Personally, the latter two are things that I've thought of as annoyances with Racket's macro system for the past couple of years (ever since I started seriously learning it). I remember being particularly disappointed to learn syntax templates just silently accepted every variable name without question, rather than somehow magically knowing how to parse Finally, I agree with the OP's issue with literals, but I want to add that bound literals are also a problem. (I expressed some related concerns and ideas on another issue the other day, so this might sound familiar.) Bound literals (and If macros are going to give an identifier a new meaning, they should do so using an explicit, hygienic binding occurrence. And if they do not intend to bind a local meaning, then they should really be making use of the nonlocal meaning (e.g. using [1] R4RS description of |
@rocketnia This is an excellent summary of the issues of concern. This is exactly the reason why these discussions are so valuable before writing up a detailed RFC proposing some solution. Thank you. |
Well said @rocketnia! And yes, just to clarify, I meant |
I spent a lot of time today finding a bug which is caused by a typo: |
Extracted from the old racket2 wiki. #33
Perhaps it should be merged with a more general discussion about
syntax-case
/syntax-parse
.The text was updated successfully, but these errors were encountered: