thx @badkins
I will have look
thx! for all infos! :racket-flat: . I just want to be sure that I’m not writing Macros because they are cool or new to me , but I want to see which problem they solve. It is more important to me to understand them in this way so I can make a precious usage on them.. thx I hope to use one soonish :grin:
In the case of nested macro calls, is the inner macro expanded first, so the outer macro consumes the results of expanding the inner macro? For example: (outer-macro (inner-macro arg1) arg2)
@badkins I saw your phone number example on the mailing list. I think the answer is no. In (phone-numbers (add-prefix ...))
since phone-numbers
is a macro, it will receive (add-prefix ...)
as input - no matter what you defined add-prefix
to be/do.
The syntax transformer of the outer macro is called with #’(inner-macro arg1).
@soegaard2 makes sense - that was my tentative conclusion after some testing. It’s different from function calls in this regard.
I also think the answer to my mailing list question (whether it can be done w/o cooperation from phone-numbers
) is no because I don’t know what add-prefix
could return to make that work - I tried begin
, but that only returns the last expression, and values
on a whim :slightly_smiling_face: I’ll just add another case to phone-numbers
I’ve got an idea. Someone should write “The Little Macrologist” ! A graduated, step-by-step approach to macro competency. My sense is that once you get to a certain level of competency, the documentation will take you the rest of the way, but it’s a bit painful getting to that first level.
Yes, it’s helpful, but a lot of what I’ve had to work through in the last couple of days isn’t addressed.
I don’t think it will take too long for me to gain reasonable competency, but it’s crazy for everyone to work through the same issues via trial & error, etc.
@badkins like what?