I desire to propose a complete and consistent name and wording for all the existing tags that refer to the C++ containers. They include stdarray, stdvector, stddeque, forward-list, stdlist, stdset, stdmap, unordered-set, unordered-map.
The purpose is to replace the current names and descriptions with a new one that is consistent among containers. About the name, different proposals have been advanced to link the std
prefix with the actual name, such as std-
, std--
, std.
, std..
. Since the first one is simpler and consistent with already-existing naming convention, it has been preferred. The excerpt explicitly indicates the programming language and library, basic characteristics (time-complexity, value type) and (eventually) the underlying data structure. Furthermore, it is also specified if the tag may be used to refer to other containers, like in the case of associative and unordered associative containers.
Since this proposal is a work in progress, I would like to receive opinions and feedbacks. With it, I also hope to create a reference for future tag edits.
Changes to the proposal can be found in the edits history, including credits.
Proposed excerpt wording
std-array
std::array is a class of the C++ Standard Library (since C++11). It is a container that encapsulates a fixed-size array.
std-vector
std::vector is a class of the C++ Standard Library. It is a container that supports amortized constant-time insert and erase operations only at the end, while they are linear-time elsewhere. It is usually implemented as a dynamically-allocated array.
std-deque
std::deque is a class of the C++ Standard Library. It is a container that supports amortized constant-time insert and erase operations at both the beginning and the end, while they are linear-time elsewhere. It is usually implemented as a hashed array tree.
std-forward-list
std::forward_list is a class of the C++ Standard Library (since C++11). It is a container that supports constant-time insert and erase operations at any position in the sequence. It is usually implemented as a singly-linked list.
std-list
std::list is a class of the C++ Standard Library. It is a container that supports constant-time insert and erase operations at any position in the sequence. It is usually implemented as a doubly-linked list.
std-set
std::set/std::multiset is a class of the C++ Standard Library. It is an associative container that supports logarithmic-time search, insert and erase operations. It is usually implemented as a red-black tree.
std-map
std::map/std::multimap is a class of the C++ Standard Library. It is an associative container that supports logarithmic-time search, insert and erase operations. It is usually implemented as a red-black tree.
std-unordered-set
std::unordered_set/std::unordered_multiset is a class of the C++ Standard Library (since C++11). It is an unordered associative container that supports amortized constant-time search, insert and erase operations. It is usually implemented as a separate-chaining hash table.
std-unordered-map
std::unordered_map/std::unordered_multimap is a class of the C++ Standard Library (since C++11). It is an unordered associative container that supports amortized constant-time search, insert and erase operations. It is usually implemented as a separate-chaining hash table.
::
to the tag name.std
and the name. For example, should they bestd-array
,std--array
,std.array
,std..array
,c++-std-array
,c++-std--array
,c++-std.array
,c++-std..array
, or some other format using the permitted characters.:
is not a permitted character in tag names. See "What symbols/characters are not allowed in tags?"std
. I think it would be better to have a-
(given that:
is not permitted), as there's no other good choice really IMO. No strong feelings on any particular choice though (other thanc++-
prefix feeling very redundant).c++
isn't the only language that usesstd
as name for the standard library.c++
andc++-std-map
on a question would be redundant, but ensuring that the tag isn't accidentally used on questions in a different language is also important. Maybe ac++-
prefix isn't a bad idea after all.:
isn't a permitted character, unfortunately). I'd suggest also linking to searches for each of the tags without the c++ tag (e.g.,[unordered-map] -[c++]
), as non-C++ uses will need to be handled.std
entirely since it is not part of the class name. However I can see the point in keepingstd::array
separate from the general array/list/set etc tags since that would make the general tags more ambiguous.std
prefix that end up getting renamed will have to be investigated for non-C++ uses, which will be substantial work. Personally, I think the renaming suggestions in the question are good, though there potentially are some minor improvements to be made. Quuxplusone's answer is the only one, but it doesn't have sufficient support, IMO, to be implemented (especially given how many questions it will touch).