Subject: Re: std::colony name brainstorming
From: Henry Miller (hank_at_[hidden])
Date: 2021-02-08 12:29:16
The bikeshed needs paint, Matt choose a color. I'd prefer to go with it over waste time in discussions that are hard to agree on.
I do not think you will find any anything short in English that describes what colony does, so we need to settle on something and learn it. A non-programmer seeing std::vector for the first time will probably think direction and magnitude because that is what math uses the term for, but as seasoned C++ programmers we have long ago learned what vector is in programming and don't even think about could there be a better word. Likewise, the important part of colony is we learn the name
If you know of a different programming language that uses colony for something different, then please bring that up. We should have a discussion on if C++ using it for something different is a problem we should worry about or not. In this case we includes the users of the other language.
If you know of some other human language (in modern use not required) that does have a word for what colony does, then I'm interested. After verifying with experts then we will give it an ASCII spelling and an interesting footnote in every C++ book from now on.
Failing the other two, think hard: is your contribution actually useful, or just bike-sheding? https://en.wiktionary.org/wiki/bikeshedding.
-- Henry Miller hank_at_[hidden] On Mon, Feb 8, 2021, at 11:54, Ville Voutilainen via SG14 wrote: > On Mon, 8 Feb 2021 at 19:43, Ben Craig via SG14 <sg14_at_[hidden]> wrote: > > > > 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=t. 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? > > A "bundle" doesn't mean anything. My jokes about this being a British > Colony aside, that's not what the name means, > it indeed means "a distinguishable localized population within a > species". New members of the population are added, > old ones go away. The current name describes what it is and what > operations (especially the population member > addition/removal) are frequently performed on it. No "skip_*" name > describes that as well - such names get into > implementation weeds, rather than describing the higher-level > semantics of the type. > > So unless there is a superior name that keeps the higher-level > descriptiveness, keep the current name. > _______________________________________________ > SG14 mailing list > SG14_at_[hidden] > https://lists.isocpp.org/mailman/listinfo.cgi/sg14 >
SG14 list run by email@example.com
Older Archives on Google Groups