|
|
|
|
|
by lmm
2901 days ago
|
|
> Well, you waste space, time, and energy making the compiler and linker do work that doesn't inherently need to be done. It's repetitive, error-prone work, better to have the compiler and linker do it than rely on the programmer getting their use of the preprocessor right. And even if the programmer gets it right, doing it via macros means every tool that you want to apply to your codebase - IDEs, profilers, coverage, instrumentation - needs to understand your macro. Are you sure they'll all get it right? Better to write plain old standard code that every tool will work correctly with, and the worst thing that can ever happen is a slight performance penalty. |
|