Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-18 11:30:04


Tobias Schwinger <tschwinger_at_[hidden]> writes:

> Does the macro's name describe what the macro generates (e.g.
> BOOST_XYZ_EXPRESSION) or does the macro's name describe a purpose
> (e.g. BOOST_REGISTER_XYZ)?
>
> Name describes expansion : semicolon must not be added by the user
> Name describes purpose : semicolon must be added by the user
>
> It indirectly depends on the design of the particular library:
>
> If you want the user to look at the macro as part of the interface
> use "purpose naming" (imperative) and have the user supply a
> semicolon.
>
> If you want the user to look at the macro as a code generator (e.g.
> convenience-shortcuts with a documented alternative that could be
> written manually) use "expansion naming" (noun/perfect) and put the
> semicolon inside the macro.

IIRC someone else proposed a policy that Paul M. agreed with -- at
least conditionally -- but I can't find it in the archives. Can
somebody point me to it? Since Paul is a PP expert it makes sense to
give anything he agrees with a second look.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk