-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Mostly a placeholder issue for now, we need to spec this feature out.
The general idea is to allow macros inside of constructor bodies. These macros would be able to inline any code they wish at their invocation site, effectively replacing a call to the macro with arbitrary code.
Use cases might include:
- How would I do Intl.message in this system?ย #24
- Building expressions from statementsย #18
- Configuration dependent code - for instance you should be able to write your own version of
assertthat actually inlines nothing in release builds. - Can possibly help with a macro based version of flutter_hooks
These macros would likely run in a new 4th macro phase, and would have full reflective access to the program, but would not be able to add any new declarations to the program, only inline some code at the site where they are invoked.
TimWhiting and munificent
Metadata
Metadata
Assignees
Labels
No labels