Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[range.adaptors] Generators bundled together with the adaptors #2615

Closed
JohelEGP opened this issue Dec 25, 2018 · 4 comments
Closed

[range.adaptors] Generators bundled together with the adaptors #2615

JohelEGP opened this issue Dec 25, 2018 · 4 comments
Assignees

Comments

@JohelEGP
Copy link
Contributor

At http://ericniebler.com/2018/12/05/standard-ranges/, right before the "Range Adaptors" section is "Range Generators." [range.adaptors], which is supposed to describe range adaptors, also bundles these generators. You'll notice from the description of the view::X objects that those for the adaptors are described as denoting range adaptor objects, while those of the generators denote customization point objects. Shouldn't the generators live in their own subclause?

@jensmaurer
Copy link
Member

Let's formulate this a bit harsher: The intro sentence of [range.adaptors] says "This subclause defines range adaptors, which are utilities that transform a Range into a View with custom behaviors."
This is a lie; the subclause also contains iota_view, single_view, and empty_view, which perform no such transformation.
I would be ok with introducing a new subclause "Range generators" with these, but we should ask around.
@CaseyCarter, any opinion here?

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 27, 2018
@CaseyCarter
Copy link
Contributor

This is a lie

It notably does not say "This subclause only defines range adaptors...". ;)

This has been bothering me but never quite managed to float to the top of the heap of things that needed to be fixed. I've been considering "Range factories" as a name for the things that fabricate views from whole cloth. There will eventually be a generate view a la the generate algorithm whose elements are the results of successive calls to a generator function - if we can get the semantics nailed down. When and if that day comes, "Range factories" will be a slightly clearer name than "Range generators."

iota, single, and empty are all the members of that set currently in the working draft.

@jensmaurer jensmaurer self-assigned this Dec 29, 2018
@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 29, 2018
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Dec 30, 2018

Wouldn't "View factories" be more descriptive? While the range adaptors can take any range and transform it into a view thanks to view::all, the factories don't necessarily involve a range or refinement thereof as input.

@CaseyCarter
Copy link
Contributor

Wouldn't "View factories" be more descriptive?

I agree that "View factories" would be more precise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants