4 ms·
I think the problem with macros is that they do not always compile and do not always work fine. Debugging macros is hard by any definition, because you have to
by MichaelMoser70 14y ago
I think the problem with macros is that they do not always compile and do not always work fine. Debugging macros is hard by any definition, because you have to reason about both what is written and what goes on behind the scenes. A macro is great if the same genius is both writing the macro and using it, otherwise it sucks, in practical terms.
With a function things are much easier – one know what gets in, and you can tell the author of the function what has gone wrong; much easier then trying to understand how the macro did unwind; with macros the additional complexity is that one has to understand what the user of the macro was trying to do.