DEV Community

Cover image for Macro Vs Function

Macro Vs Function

Dhanashree Rugi on June 27, 2022

Macro Function It is a fragment of code given a name macro and is defined by the preprocessor directive #define. In the program before comp...
Collapse
 
pauljlucas profile image
Paul J. Lucas

Macros are never "called." You don't explain to a beginner what "preprocessed" means. Saying program execution becomes slow for functions is ridiculously disingenuous. Macros do not consume memory!

There are much better explanations of macros all over the place online. Why even bother? Why not explain something that is not all over the place?

Collapse
 
dhanashreerugi profile image
Dhanashree Rugi

Thanks for suggestions.