|
|
|
|
|
by yudlejoza
1931 days ago
|
|
I'm a big fan of C but, to be fair, your example makes border-line abuse of the macro system. In my opinion, the example doesn't show that C language per se (without the preprocessor part) is capable of higher-order functions (but as others have pointed out, it is, in the form of function pointers). |
|
C's preprocessor is very powerful and like the rest of the language it can be used to shoot yourself in the foot - but that doesn't mean you shouldn't take full advantage of it or that actually taking advantage of it instead of treating it as a poor man's module system is "abusing" it.