From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2022-08-24 17:16:02
For this case, I definitely prefer ref to view.
On Wed, Aug 24, 2022 at 10:37 AM Vinnie Falco <vinnie.falco_at_[hidden]> wrote:
> On Wed, Aug 24, 2022 at 7:59 AM Zach Laine via Boost
> <boost_at_[hidden]> wrote:
> > This seems to be the heart of the matter. I expect params to be a
> > real flat_map or map or sorted vec, and it's not.
> Yeah, I see what you mean. "params" sounds like its a first-class
> object, but it isn't.
> > If my expectation is wrong because of the lack of a _view suffix in
> > the name, that's fine -- but please add that to make things clear.
> There are 8 containers which need names:
> We prefix the type name with the type of element "segment" or "param",
> so that it sorts nicely. We could have went with "encoded_segments"
> which also makes sense but then they don't group together as well and
> it hurts discoverability in the docs (Ramey Rule).
> The _encoded suffix is self-explanatory. We chose the suffix _view to
> distinguish from the read-only containers from the mutating ones.
> Someone suggested putting "const" and "mutable" in the name but in my
> opinion that is ugly:
> > However, the _view suffix in std C++ is used exclusively for immutable
> > types, so maybe something else is indicated, like _facade or some
> > variation of span.
> As if we didn't have a hard enough time coming up with 8 names that
> have synergy and aesthetics :) How about the suffix _ref?
> Or we could mix _ref and _view?
> We did the best we could with the current names and I know they aren't
> perfect. We're more than happy to hear feedback on whether any of
> these alternatives are resonating with folks, or if someone wants to
> propose a new set of 8 identifier names.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk