Boost logo

Boost :

Subject: Re: [boost] [context] boost::ctx::?
From: Beman Dawes (bdawes_at_[hidden])
Date: 2012-09-14 16:22:33


On Fri, Sep 14, 2012 at 10:55 AM, Eric Niebler <eric_at_[hidden]> wrote:
> On 9/14/2012 10:42 AM, Greg Rubino wrote:
>> On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave_at_[hidden]> wrote:
>>
>>>
>>> ctx seems like a needlessly short abbreviation. Wouldn't it be better
>>> and more consistent with the rest of Boost to ask users to write
>>>
>>> using namespace ctx = boost::context;
>>>
>>> if they want something short?
>>>
>>
>> I was thinking the same thing actually. +1
>>
>> AFAICT, it seems like the general convention is that if the name of the
>> library is Boost.Beetlejuice, then the namespace will be
>> boost::beetlejuice. The word 'context' isn't really long enough to justify
>> breaking that tradition IMO.
>
> Amazingly, we actually have a published convention for these things. :-)
>
> http://www.boost.org/development/requirements.html
>
> 'The library is given a name that describes the contents of the library.
> Cryptic abbreviations are strongly discouraged. Following the practice
> of the C++ Standard Library, names are usually singular rather than
> plural. For example, a library dealing with file systems might chose the
> name "filesystem", but not "filesystems", "fs" or "nicecode".'
>
> It goes on to say that if there is a class or function of the same name
> as the library (boost::tuple), the name should be pluralized (e.g.
> boost::tuples::tuple, but tuple isn't in it's own namespace so it's moot
> in this case).
>
> So, if there already is a component boost::ctx::context, or if you would
> like to leave that door open, the namespace should be "boost::contexts".
> Otherwise, the namespace should be "boost::context", IMO.

+1

--Beman


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