C++ Logo


Advanced search

Subject: Re: :colony name brainstorming
From: Ben Craig (ben.craig_at_[hidden])
Date: 2021-02-08 11:57:46

Agreed that there is some baggage with the term stable. However, in non-standardese communication, we will often talk about iterator invalidation and iterator stability as the same kinds of things (with one being the opposite of the other). Same thing for reference invalidation and reference stability.

From: Billy O'Neal (VC LIBS) <bion_at_[hidden]>
Sent: Monday, February 8, 2021 11:46 AM
To: sg14_at_[hidden]; Matt Bentley <mattreecebentley_at_[hidden]>; C++ Library Evolution Working Group <lib-ext_at_[hidden]>; Guy Davidson <guy_at_[hidden]>
Cc: Ben Craig <ben.craig_at_[hidden]>
Subject: [EXTERNAL] Re: :colony name brainstorming

Note that we already use "stable" to mean a situation where the user has more​ control over the ordering of elements, not less. http://eel.is/c++draft/algorithm.stable$>
From: Lib-Ext <lib-ext-bounces_at_[hidden]<mailto:lib-ext-bounces_at_[hidden]>> on behalf of Ben Craig via Lib-Ext <lib-ext_at_[hidden]<mailto:lib-ext_at_[hidden]>>
Sent: Monday, February 8, 2021 09:43 AM
To: sg14_at_[hidden]<mailto:sg14_at_[hidden]> <sg14_at_[hidden]<mailto:sg14_at_[hidden]>>; Matt Bentley <mattreecebentley_at_[hidden]<mailto:mattreecebentley_at_[hidden]>>; C++ Library Evolution Working Group <lib-ext_at_[hidden]<mailto:lib-ext_at_[hidden]>>; Guy Davidson <guy_at_[hidden]<mailto:guy_at_[hidden]>>
Cc: Ben Craig <ben.craig_at_[hidden]<mailto:ben.craig_at_[hidden]>>
Subject: [isocpp-lib-ext] std::colony name brainstorming

The paper talks a lot about the name colony, and that the name “bag” isn’t a good fit. I want to see if we can have other good names (or name pieces) get discussed on the mailing list.

For picking names, I like using a name as a way to compare and contrast against similar choices. Ideally, the name should indicate why you would use one facility over another.

The big reasons I see to prefer colony over another container:

  * Pointer and iterator stability
  * Contiguous block storage for faster iteration (i.e. not a node based container)
  * O(1) inserts and deletes
  * Re-orderable / sortable

Reasons to use other containers:

  * Contiguous elements
  * Sub-linear lookup
  * Sorted by default
  * User control over insert location

I don’t see a good way to tease out the subtle contiguity differences in a short name. The stability aspect isn’t too hard though… “stable_<foo>” can communicate that… assuming we can find a suitable <foo>. The main downside to “stable_” is all the node based containers are already stable, but don’t have the prefix.

I’m leaning towards “stable_bundle”. “bundle” communicates a bit of disorganization. It still sounds like a container (“a bundle of ints”). I don’t think it has strong precedence in CS unlike so many other names. “bundle” as the root is still rather arbitrary though. Neither part of the name communicates that fast iteration is a key aspect of the container.

We could attempt to fill <foo> with something that indicates the expected implementation strategy. I’m less fond of that approach, but it can help communicate the design of the container. I can suggest “stable_skip_array” and “stable_skip_list”. I’m not overly fond of “array” or “list” in the names though, as they suggest layouts that aren’t entirely accurate (single large allocation and individual element allocation respectively). I’m not fond of “bucket” since that has precedence in our hash map apis, though I could live with “stable_bucket”.

A thesaurus item to start from:
https://www.thesaurus.com/browse/array?s=t141af91ab2d7cd011db47*7C1*7C0*7C637484030542642443*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C1000&sdata=*2FMxMf5IXtu8kLgFkuMLFpSIymqEwzKVC0l*2BpUATjFGA*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!FbZ0ZwI3Qg!4DzNKoP8LyHw6nvDthCwJWcJyvpjstKB4k_dKSMAraTsqCqBb8GSpT1s5UUd$>. I’ve browsed over list, container, and aggregate for other ideas.

Are there other aspects of the container we should look at for naming? Any suggestions for affixes or roots for a multi-part name?

SG14 list run by sg14-owner@lists.isocpp.org

Older Archives on Google Groups