darioszr
2019-8-20 15:02:13

thx @badkins


darioszr
2019-8-20 15:02:18

I will have look


darioszr
2019-8-20 15:05:02

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:


badkins
2019-8-20 23:20:59

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)


soegaard2
2019-8-20 23:26:43

@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.


soegaard2
2019-8-20 23:27:45

The syntax transformer of the outer macro is called with #’(inner-macro arg1).


badkins
2019-8-21 00:14:36

@soegaard2 makes sense - that was my tentative conclusion after some testing. It’s different from function calls in this regard.


badkins
2019-8-21 00:16:46

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


badkins
2019-8-21 01:43:22

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.


badkins
2019-8-21 01:51:35

Yes, it’s helpful, but a lot of what I’ve had to work through in the last couple of days isn’t addressed.


badkins
2019-8-21 01:52:41

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.


zenspider
2019-8-21 02:41:49

@badkins like what?