What's the deal with not doing macros ? or what's the deal with trying to avoid macros ?
I've seen some posts recently telling to slow down on the use of macros: DSL!=macros, re-writing code with functions instead of macros, the begin of a study to switch from macros to functions...
but what's the deal ? you think macros will rule the world and you don't want that ?
What is wrong with macros? why lower their usage ? aren't they supposed to be a method to extend the language ?
The main argument I see for preferring function to macros is that they aren't available as first class functions at run time, which limits your flexibility to use various powerful functional programming techniques.
Personally I think macros are still an extremely useful programming tool providing you use them appropriately - i.e. enabling you to do complex code transformations at compile time that would otherwise incur high runtime costs or require a lot of unnecessary boilerplate code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With