-
Notifications
You must be signed in to change notification settings - Fork 225
Description
The macro proposal allows macros to produce code which contains macro applications. When that happens, it says:
If a macro application is added which implements an earlier phase, that phase
is not ran. This should result in a warning if the macro does not also
implement some phase that will be ran.If a macro application is added which runs in the same phase as the current
one, then it is immediately expanded after execution of the current macro,
following the normal ordering rules.
That seems both confusing and brittle to me. I can't imagine a macro author ever wanting an earlier phase of their macro to be silently skipped just because it happens to have a later phase and some other macro happened to generate the application.
My first inclination is to say we disallow generating macro applications entirely. I don't know that we have a strong use case for it. If we do have a compelling use case, I think we should consider looping the entire expansion process. Something like:
- Apply all phase 1 macros.
- Apply all phase 2 macros (that were not added in this cycle).
- Apply all phase 3 macros (that were not added in this cycle).
- If any of those produced new macro applications, then goto 1 and run all three phases of those new macro applications.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status