
In-Reply-To: <d55r5q$9h2$1@sea.gmane.org> gennadiy.rozental@thomson.com (Gennadiy Rozental) wrote (abridged):
Adding #defines is adding complexity.
I think it's a kinda an attitude issue: you see all macros as enemies.
No. Adding almost anything is adding complexity. It's another layer. And of course a rather powerful layer - a macro can do almost anything. Also you snipped the context. Your proposal here was, if I understand correctly, to use conditional compilation to switch off FOREACH's support for corner cases. So we are adding more options and configurability, and the potential for my corner cases not to work because support for them has somehow been switched off (where - in the makefile?). Even if I know how FOREACH works in my project, it might work differently on my colleague's project. And I have yet more code to read when I look at the header. It's as if we were trying to build the most complex thing that could possibly work.
I see some of them as friends. Macros in general (and FOREACH in particular) are in most cases only usability helpers (there is also configuration switched domain, but it's beside the point). And until language provide as-convenient alternatives I am ready to accept the macro nature of these tools.
I'm ready to accept them too, when they do something worth while. This one doesn't. -- Dave Harris, Nottingham, UK.