BorisTheOld wrote:Clever, but I'm not convinced.
Allowing runtime redefinition of macros is too much like self-modifying code. Sure it's a powerful technique, but screw-ups can be a disaster, and debugging can be a nightmare.
Schedules, budgets, and sanity go out the window, and this is not something that should be encouraged.
Well, from my experience the use of Macro redefinition in C/C++ in practice leads to exactly the opposite.
Less bugs, cleaner and shorter code, faster development, more robust and consistant result, happier developpers and clients.
But again, if you don't know what you are doing, using macros redefinition, using pointers, using bad named variables or procedures, using FASM, using a programming language, using a car, a motorcycle, walking in the streets, you can allways screw-up, and this can be a disaster, and 'debugging' can be a nightmare, yes, and those activities shouldn't be encouraged.
But what about those who do ? Should they live in a safeguarded room for the rest of their live ? I don't think so.
Cheers,
Guy.