C++ Logo

std-proposals

Advanced search

Re: Python-style comprehensive containers

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Mon, 21 Jun 2021 09:39:40 -0400
On Mon, Jun 21, 2021 at 2:45 AM DBJ <dbj_at_[hidden]> wrote:
>
>
> " ... Views are for lazy operations, and lazy operations don't allow to
> interleave individual lazy operations between threads..."
>
> Views are not behavioral patterns. Views are not "for" any kind of behavior.

If that were true, they wouldn't specify a kind of behavior. Yet they
do; lazy evaluation is part of them.

What exactly would it mean to have a view that evaluated iterators
with the individual sub-views happening on different threads? How
could you even get a `begin` iterator from such a thing?

This sounds more like a use case for a sequence of generators, not
ranges (generators can present as ranges, but they're always input
ranges, unlike views). Right tool for the right job.

Received on 2021-06-21 08:39:53