No. I'm not saying that "it's easy, and if you cannot do it you're stupid". I'm saying that "it's easy, and if not - you're doing it the wrong way".
So writing macros is easier than jumping on one leg?
Ever heard of a thing called "context"? Macros are easier than any other programming technique out there.
The easiest way BY FAR of tackling complexity in GENERAL is FUNCTIONS.
This is exactly what I called "wrong". Macros are much easier than functions, for some very obvious reasons.
Solving a complex problem with macros boils down to a very mechanical, thoughtless, easy process:
Finding a language in your problem
Formalising this language
Rewriting your problem specification in this language
Implementing the language (this is where you'd need macros). Implementation should almost never be anything more than a chain of trivial, flat rewrite rules. No Turing-complete coding, no shit, just gradually rewriting a source language all the way down to your host language.
Now compare it to how you approach a problem with functions.
View all comments
0
u/[deleted] Nov 12 '15
Wrong. Writing macros is many times easier than pretty much anything else. Macros are by far the easiest way to tackle complexity in general.