|
Boost : |
Subject: Re: [boost] [context] boost::ctx::?
From: Alexander Arhipenko (arhipjan_at_[hidden])
Date: 2012-09-27 10:31:50
Hi,
On Fri, Sep 14, 2012 at 5:55 PM, 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
>>
[snip]...
>
> 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".'
>
[snip]...
> Otherwise, the namespace should be "boost::context", IMO.
>
> Thanks,
>
> --
> Eric Niebler
> BoostPro Computing
> http://www.boostpro.com
>
What about names like asio, spirit, karma, phoenix, xpressive etc?
I don't think that they strictly follow mentioned guidelines.
BTW, I adore all of those names and would not like
changing e.g. asio to async_io or any other.
Also, IMO `fs` name is read/written much better than 10-letter `filesystem`.
In regards to `ctx` vs `context` - IMO shortest names are preferable.
Although `ctx` is not brilliant.
Maybe author should think of some "karmic" name?
Regards
P. S.
Some notes in regards to long names.
Library authors should take into account the shared library aspects.
The longer exported names (e.g. boost::filesystem3::path) -
the longer library load time.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk