2 ms·
Macros are expending in the typing process. In macro you can use compiler API to type some untyped AST (for example, argument of macro). For example, "foreach"
by VladD2 15y ago
Macros are expending in the typing process. In macro you can use compiler API to type some untyped AST (for example, argument of macro).
For example, "foreach" macro use compiler API to infer type of collection. This macro generate specialized code for different collection kind (array/list/IEnumerable).