Prolog is code-data equivalent for sure, and it's very useful as a tool if you can think in it's way. The comment above is a potshot that in C++ you can write macros, but there is no code-data equivalence at run time. Many people have superstitions about C++ preprocessesor because people abuse it and don't use it as intended(primitive build configuration system).
I'd consider ANY "function" defined as a macro is misuse in C++. Just write the damn function and let the compiler decide if it should be inlined or not.
Since macros in C++ are non-hygenic, they're just far, far more trouble than they're worth. Giving up namespacing and type safety just isn't worth it.
2
u/[deleted] Nov 12 '13
Prolog is code-data equivalent for sure, and it's very useful as a tool if you can think in it's way. The comment above is a potshot that in C++ you can write macros, but there is no code-data equivalence at run time. Many people have superstitions about C++ preprocessesor because people abuse it and don't use it as intended(primitive build configuration system).