Naming Issues [part of Formal Review: Indexed Set]

This should be starting point of discussions about proper indexed_set naming. indexed_set name was picked long before the library gained much more functionality. Instead of changing name immediatelly it was decided to wait on opinion of others (any change requires quite a lot of work). Here are my suggestion of names, with rationale: 1. the data structure should be named "multi_container" and should reside (or be lifted) in boost namespace. Rationale: it is superset of std::set/multiset/list and possibly slist and deque). Therefore the "multi". The structure is important and will be probably unique - therefore the boost namespace. 2. library specific names that won't fit into boost namespace should be in "multiindex" namespace. Rationale: it will be used mainly for index related names. The name is aso reasonably short. 3. indexes should be named: set_like, multiset_like, list_like, slist_like, deque_like. Rationale: it gives idea to user what it is about (more than e.g. sequenced). 4. Since indexed_set::unique may clash with std::unique I suggest to use words "distinctive", "non_distinctive". Rationale: I found it in a dictionary as the only one word synonum to unique. English native comment welcomed. /Pavel

| -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Pavel Vozenilek | Sent: 19 March 2004 22:55 | To: boost@lists.boost.org | Subject: [boost] Naming Issues [part of Formal Review: Indexed Set] | | Here are my suggestion of names, with rationale: | | 1. the data structure should be named "multi_container" | and should reside (or be lifted) in boost namespace. | | Rationale: it is superset of std::set/multiset/list | and possibly slist and deque). Therefore the "multi". | The structure is important and will be probably | unique - therefore the boost namespace. | | 2. library specific names that won't fit into boost | namespace should be in "multiindex" namespace. The 'ii' looks a bit un-english. I would use a hyphen - as I am sure would Lynn Truss of "Eats, Shoots and Leaves' fame. (I felt this about the documentation too) So how about multi_index? Also consistent with "multi_container" where a _ is used? | Rationale: it will be used mainly for index related | names. The name is aso reasonably short. | | 3. indexes should be named: set_like, multiset_like, | list_like, slist_like, deque_like. | | Rationale: it gives idea to user what it is about (more | than e.g. sequenced). | | 4. Since indexed_set::unique may clash with std::unique | I suggest to use words "distinctive", "non_distinctive". | | Rationale: I found it in a dictionary as the only | one word synonum to unique. English native comment welcomed. I see no need for the suffix 'ive - how about just "distinct"? The only other word that comes to mind with a similar meaning is "sole" Unique is really unique. Is there _really_ a clash with STL usage? Paul PS Truly English native speaker of english unsullied by the ex-colonials ;-) Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539 561830 +44 7714 330204 mailto: pbristow@hetp.u-net.com

Paul A Bristow <boost <at> hetp.u-net.com> writes:
| -----Original Message----- | From: boost-bounces <at> lists.boost.org | [mailto:boost-bounces <at> lists.boost.org] On Behalf Of Pavel Vozenilek
[...]
| 2. library specific names that won't fit into boost | namespace should be in "multiindex" namespace.
The 'ii' looks a bit un-english.
I would use a hyphen - as I am sure would Lynn Truss of "Eats, Shoots and Leaves' fame. (I felt this about the documentation too)
So how about multi_index? Also consistent with "multi_container" where a _ is used?
This is supposed to be a brainstorming thread, so allow me to dissent here :) Lacking a solid English language intuition, I often use Google to try to find "best uses": "multiindex" yields 20,300 hits, while "multi index" only produces 15,400 results. Note that "multi index" includes "multi-index" as well as other variants, so the case for "multiindex" seems to be even stronger than the raw figures show. OTOH, "multi-indexing" seems far more common than "multiindexing". Maybe we could stick with boost::multiindex and change "multiindexing" with "multi-indexing" in the text? multi_container seems to me awkward if compared to std::multimap. Why not multicontainer? Admiteddly, the "multi" prefixes do not mean the same in both cases, which could lead to confusion. Have you had a chance to take a look at the review notes? Some other alternatives are proposed there. I particularly like the boost::mix proposal, though others hate it. [...]
Unique is really unique.
Is there _really_ a clash with STL usage?
Yep. The following using namespace boost::indexed_sets; using namespace std; will raise the problem as soon as you declare an unique regular index. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

"Joaquin M Lopez Munoz" <joaquin@tid.es> wrote
multi_container seems to me awkward if compared to std::multimap. Why not multicontainer? Admiteddly, the "multi" prefixes do not mean the same in both cases, which could lead to confusion.
I took inspiration in "multivitamin", underscore is there to improve readability ;-) /Pavel

Just because I'm English doesn't mean I am right ;-) (But then nor does that mean that internet users are right either.) I have glanced at the review notes but don't feel able to make any helpful comment - except that naming is important but clearly especially tricky. Consistency IS valuable though - it is irritating to try to remember if a _ is needed or not - and I usually don't - leading to a blizzard of warning messages from the oligo-neuronic compiler. So I feel you should either go for always using multi_, or never. And since STL already uses multimap, you should ignore my hyper-sensibility about "multiindex" in names (and that would make it odd in the text). (Aside - I don't like "mix" at all, but I do like ordered rather regular). Sorry this isn't much help. Paul PS At least english is unreceptive to authority and always receptive to new words, preferably stolen! Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539 561830 +44 7714 330204 mailto: pbristow@hetp.u-net.com | -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Joaquin M | Lopez Munoz | Sent: 23 March 2004 14:31 | To: boost@lists.boost.org | Subject: [boost] Re: Naming Issues [part of Formal Review: | Indexed Set] | | | Paul A Bristow <boost <at> hetp.u-net.com> writes: | > | > | -----Original Message----- | > | From: boost-bounces <at> lists.boost.org | > | [mailto:boost-bounces <at> lists.boost.org] On Behalf Of | Pavel Vozenilek | [...] | > | 2. library specific names that won't fit into boost | > | namespace should be in "multiindex" namespace. | > | > The 'ii' looks a bit un-english. | > | > I would use a hyphen - as I am sure would Lynn Truss of | "Eats, Shoots | > and Leaves' fame. | > (I felt this about the documentation too) | > | > So how about multi_index? Also consistent with | "multi_container" where | > a _ is used? | > | | This is supposed to be a brainstorming thread, so allow | me to dissent here :) | Lacking a solid English language intuition, I often use | Google to try to find "best uses": "multiindex" yields | 20,300 hits, while "multi index" only produces 15,400 | results. Note that "multi index" includes "multi-index" | as well as other variants, so the case for "multiindex" | seems to be even stronger than the raw figures show. | OTOH, "multi-indexing" seems far more common than | "multiindexing". Maybe we could stick with | boost::multiindex and change "multiindexing" with | "multi-indexing" in the text? | | multi_container seems to me awkward if compared | to std::multimap. Why not multicontainer? Admiteddly, the | "multi" prefixes do not mean the same in both cases, which | could lead to confusion. | | Have you had a chance to take a look at the review | notes? Some other alternatives are proposed there. I | particularly like the boost::mix proposal, though others | hate it. | | [...] | > | > Unique is really unique. | > | > Is there _really_ a clash with STL usage? | > | | Yep. The following | | using namespace boost::indexed_sets; | using namespace std; | | will raise the problem as soon as you declare | an unique regular index. | | Joaquín M López Muñoz | Telefónica, Investigación y Desarrollo | | _______________________________________________ | Unsubscribe & other changes: | http://lists.boost.org/mailman/listinfo.cg| i/boost | |

"Paul A Bristow" <boost@hetp.u-net.com> writes:
Consistency IS valuable though - it is irritating to try to remember if a _ is needed or not - and I usually don't - leading to a blizzard of warning messages from the oligo-neuronic compiler.
So I feel you should either go for always using multi_, or never. And since STL already uses multimap, you should ignore my hyper-sensibility about "multiindex" in names (and that would make it odd in the text).
The standard may have made a mistake. It's fairly easy to swallow "multixxx" but when there are more x's it gets much harder. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (5)
-
David Abrahams
-
Joaquin M Lopez Munoz
-
Paul A Bristow
-
Pavel Vozenilek
-
Thorsten Ottosen