[context] boost::ctx::?

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? -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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.
-- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On 9/14/2012 10:42 AM, Greg Rubino wrote:
On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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. Thanks, -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Fri, Sep 14, 2012 at 10:55 AM, Eric Niebler <eric@boostpro.com> wrote:
On 9/14/2012 10:42 AM, Greg Rubino wrote:
On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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

Le 14/09/12 22:22, Beman Dawes a écrit :
On Fri, Sep 14, 2012 at 10:55 AM, Eric Niebler <eric@boostpro.com> wrote:
On 9/14/2012 10:42 AM, Greg Rubino wrote:
On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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
If the namespace is changed, I will prefer that the name convey the functionality behind the context class. We can have a lot of context. The functionality is close to a continuation context, but I don't know if it implements it completely, so maybe continuation could be considered. Best, Vicente

Le 14/09/12 22:22, Beman Dawes a écrit :
On Fri, Sep 14, 2012 at 10:55 AM, Eric Niebler <eric@boostpro.com> wrote:
On 9/14/2012 10:42 AM, Greg Rubino wrote:
On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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
If the namespace is changed, I will prefer that the name convey the functionality behind the context class. We can have a lot of context. The functionality is close to a continuation context, but I don't know if it implements it completely, so maybe continuation could be considered. 'continuation' would be longer than 'context' - is a short namespace not
Am 14.09.2012 23:05, schrieb Vicente J. Botet Escriba: preferable? The same applies to 'coroutines' - I would prefer 'coro'. Oliver Oliver

[snip]
If the namespace is changed, I will prefer that the name convey the functionality behind the context class. We can have a lot of context. The functionality is close to a continuation context, but I don't know if it implements it completely, so maybe continuation could be considered. 'continuation' would be longer than 'context' - is a short namespace not preferable? The same applies to 'coroutines' - I would prefer 'coro'.
FWIW - I think 'coro' is cryptic at best. It is neither an abbreviation nor an actual word, merely a truncation. As others have said, if you want something shorter for clarity in a local context, use an alias. Jamie
Oliver
Oliver
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Le 15/09/12 00:09, Jamie Allsop a écrit :
[snip]
If the namespace is changed, I will prefer that the name convey the functionality behind the context class. We can have a lot of context. The functionality is close to a continuation context, but I don't know if it implements it completely, so maybe continuation could be considered. 'continuation' would be longer than 'context' - is a short namespace not preferable? The same applies to 'coroutines' - I would prefer 'coro'.
FWIW - I think 'coro' is cryptic at best. It is neither an abbreviation nor an actual word, merely a truncation. As others have said, if you want something shorter for clarity in a local context, use an alias.
+1 Vicente

Am 14.09.2012 16:55, schrieb Eric Niebler:
'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".'
what was the reason to force 'filesystem' instead of 'fs'?

AMDG On 09/14/2012 01:28 PM, Oliver Kowalke wrote:
Am 14.09.2012 16:55, schrieb Eric Niebler:
'The library is given a name that describes the contents of the library. -->Cryptic abbreviations are strongly discouraged. <--- <snip>
what was the reason to force 'filesystem' instead of 'fs'?
In Christ, Steven Watanabe

on Fri Sep 14 2012, Oliver Kowalke <oliver.kowalke-AT-gmx.de> wrote:
Am 14.09.2012 16:55, schrieb Eric Niebler:
'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".'
what was the reason to force 'filesystem' instead of 'fs'?
Dollars to donuts nobody "forced" it; Beman merely had the good design sense to spell the word out rather than using a cryptic abbreviation. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

on Fri Sep 14 2012, Oliver Kowalke <oliver.kowalke-AT-gmx.de> wrote:
'The library is given a name that describes the contents of the
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
Am 14.09.2012 16:55, schrieb Eric Niebler: library. the
name "filesystem", but not "filesystems", "fs" or "nicecode".'
what was the reason to force 'filesystem' instead of 'fs'?
Dollars to donuts nobody "forced" it; Beman merely had the good design sense to spell the word out rather than using a cryptic abbreviation.
I've ctx already renamed to context in boost-trunk The STL namespace is 'std' instead of 'standard' - therefore I thought it's accepted to do it likewise.

on Fri Sep 14 2012, Eric Niebler <eric-AT-boostpro.com> wrote:
tuple isn't in it's own namespace
I beg to differ. -- Dave Abrahams BoostPro Computing Software Development Training http://www.boostpro.com Clang/LLVM/EDG Compilers C++ Boost

Hi, On Fri, Sep 14, 2012 at 5:55 PM, Eric Niebler <eric@boostpro.com> wrote:
On 9/14/2012 10:42 AM, Greg Rubino wrote:
On Fri, Sep 14, 2012 at 10:22 AM, Dave Abrahams <dave@boostpro.com> 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.
participants (9)
-
Alexander Arhipenko
-
Beman Dawes
-
Dave Abrahams
-
Eric Niebler
-
Greg Rubino
-
Jamie Allsop
-
Oliver Kowalke
-
Steven Watanabe
-
Vicente J. Botet Escriba