Understand when macros help with syntax and repeated boundary code, and when ordinary functions are clearer for NoSQL applications.
Use this section to understand macros as compile-time code transformation, not as a replacement for ordinary functions. In NoSQL code, macros are most useful when they reduce repeated boundary code without hiding database behavior.
| Macro question | Review standard |
|---|---|
| Is runtime data enough? | Prefer a function when values can solve the problem. |
| Is syntax being abstracted? | A macro may help if call-site shape is the real issue. |
| Will debugging stay clear? | Macro expansion must be easy to inspect and explain. |