|
Boost : |
From: Dave Harris (brangdon_at_[hidden])
Date: 2005-05-02 19:24:35
In-Reply-To: <d55r5q$9h2$1_at_[hidden]>
gennadiy.rozental_at_[hidden] (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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk