|
Boost : |
From: John Max Skaller (skaller_at_[hidden])
Date: 2001-06-28 16:09:20
Aleksey Gurtovoy wrote:
>
> John Max Skaller wrote:
> > I think this macro is useless and should be removed altogether.
> >
> > 1. If you're declaring an integral constant, use an enum
> > 2. Otherwise make the definition out of class.
>
> Integral constants do not always have integer type; in fact, if you search
> for BOOST_STATIC_CONSTANT on boost sources, you'll see that 'bool' is much
> more common here.
So (2) applies.
> IMO using enum trick to define something that is not an
> enumeration type at all is ugly, obscures both the code and the intent,
I'm sorry, but while I agree, the use of a macro
is much uglier and more obscure, so your argument has no weight.
We're not comparing 'enum' with 'static const int', but with
use of a proprietary MACRO.
> > [And I'd argue the enum is terser anyhow]
>
> And I'd argue that enum syntax is ugly ;).
You prefer a MACRO??
-- John (Max) Skaller, mailto:skaller_at_[hidden] 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 New generation programming language Felix http://felix.sourceforge.net Literate Programming tool Interscript http://Interscript.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk