cplusplus / papers

ISO/IEC JTC1 SC22 WG21 paper scheduling and management
678 stars 18 forks source link

P3230 R0 views::(take|drop)_exactly #1876

Open wg21bot opened 7 months ago

wg21bot commented 7 months ago

P3230R0 views::(take|drop)_exactly (Hewill Kang)

dhollman commented 5 months ago

SG9 St. Louis

SG9 saw this paper in St. Louis. We took the following polls, and we intend to follow up with mailing list discussion and electronic polling once the author makes the suggested revisions.


SG9 would like to see something in the name to indicate that the bounds are unchecked since this presents a significant safety and correctness concern.

Unanimous consent.


SG9 thinks that a checked version of (take|drop)_exactly with semantics of producing an error on overrun would be useful enough to merit a separate paper in addition to the unchecked version (that should be named differently).

SF F N A SA
1 2 3 1 2

No consensus for change 10 attending, author SA


take_while(expensive_predicate) | take_unchecked(N) gives us a useful performance example that does not require benchmarks.

Despite this example, SG9 still believes that benchmarks would significantly improve the case for this paper in LEWG and would be worth the author's time to collect.

SF F N A SA
2 4 1 1 1

SA: semantic use cases that involve fewer invocations of user-defined predicates have already been presented as performance arguments in other cases (as_input, cache_one). This is not substantially different from those discussions. 10 in the room, author A


With unchecked instead of exactly and benchmarks added, we are comfortable with mailing list review and electronic poll to forward this paper to LEWG. (We do not see significant additional SG9-specific discussion unless the benchmark results are controversial on the mailing list.)

SF F N A SA
3 3 2 0 0

SG9 also reviewed wording and the author will work offline to make several changes.

There was also discussion about whether empty_view should be special-cased to return the same type, just as with take. We will continue that discussion on the mailing list review.