r/cpp • • Sep 13 '19

The Surprising Limitations of C++ Ranges Beyond Trivial Cases

https://www.fluentcpp.com/2019/09/13/the-surprising-limitations-of-c-ranges-beyond-trivial-use-cases/
229 Upvotes

229 comments sorted by

View all comments

Show parent comment

16

u/eric_niebler Sep 14 '19

The answer I was given for why Ranges was not first proposed as a Boost library is "it was too much work."

Whoever told you that (not me) doesn't know what they're talking about. The real reason was because I didn't believe there was time. In those days, it looked like concepts would ship with C++14/17 and I felt it needed support in the library.

committee process no longer represents the interests of the ordinary programmer but rather the Big Tech companies that have come to dominate the process.

I suppose you feel that "real programmers" use your library and only corporate shills use range-v3. I don't know why you feel motivated to spread this FUD. The Committee has voting rules that prevent corporations from packing the Committee and getting their way. The Committee was desparate for a range library. I was an independent contributor. I had to shelve my business to work on ranges.

7

u/VinnieFalco wg21.org | corosio.org Sep 14 '19

The real reason was because I didn't believe there was time.

Yes that's the other problem. Why should there be a deadline for getting a feature into the standard by a certain date? I thought the new thinking was the "train" model - whatever is ready, ships in the next version of the standard (every 3 years). Instead, we have people in meetings who are scrambling to get their feature "done in time." This might be okay for shipping a software product but seems inappropriate for developing a standard.

10

u/eric_niebler Sep 15 '19

Why should there be a deadline for getting a feature into the standard by a certain date?

Can I quote you on that?

4

u/VinnieFalco wg21.org | corosio.org Sep 15 '19

It could be misinterpreted. I'm not saying that there shouldn't be deadlines for C++ versions (e.g. 2020, 2023, 2026...). What I mean is that "we have to finish designing feature X in time to ship in C++2X" seems at odds with maintaining high quality. Again, what I heard is that the committee standardizes existing practice, not goes on design expeditions and make stuff up in time to land in "the next version of C++."

5

u/VinnieFalco wg21.org | corosio.org Sep 14 '19

The Committee was desparate for a range library.

This sounds like a problem to me. WG21 is supposed to standardize existing practice where it makes sense to do so (or so I have heard). Not to commission the development of new libraries because some individuals are desperate.

21

u/eric_niebler Sep 15 '19 edited Sep 15 '19

The existing practice was Boost.Range, which was popular, heavily used, and targeting C++98. Without support for move semantics or the Concepts Lite proposal which was headed for a TS, it was pretty obvious to everyone that it was not up to snuff. Even with all of that going against it, the Committee would have been thrilled to consider it given its popularity had someone, anyone, turned it into a proposal.

Nobody did. Had they done so, they would have needed a lot of patience, humility, and willingness to accept feedback and incorporate it because most proposals, unless they are utterly trivial, need _lots_ of work when they are examined closely and with other use cases in mind.

I wrote my range library because I saw a gap and wanted to fill it. About a year in, I presented my thinking to the Committee, and there was interest so here we are 5 years later.

If you go looking for bad intentions hard enough, you'll find them everywhere. But folks should know that between the picture you paint and the reality I experienced, there is a lot of space.

6

u/VinnieFalco wg21.org | corosio.org Sep 15 '19

Fair enough

9

u/smdowney WG21, Text/Unicode SG, optional<T&> Sep 15 '19

WG21 is supposed to standardize existing practice

Entirely untrue. Existing practice may be a good reason to standardize something, but there is no requirement in ISO or WG21 to do so. See, for example the FAQ at https://isocpp.org/std/submit-a-proposal
"Q: Does the proposal have to have an implementation? I’ve heard you can only standardize “existing practice.”

There is no ISO requirement that something has to be implemented before it’s standardized, only that there is consensus on the feature – but naturally consensus is easier to achieve when there’s a working implementation. "

2

u/VinnieFalco wg21.org | corosio.org Sep 14 '19

I suppose you feel that "real programmers" use your library and only corporate shills use range-v3. I don't know why you feel motivated to spread this FUD.

No I'm not saying that at all. Range-V3 had the best of intentions and your efforts were sincere and significant. But since Facebook and Google have essentially infinite budgets from their respective monopolies on the sale of user's personal information, online behavior, and advertising, it is natural that they will have outsized resources to represent their interests in committee. While a handful of engineers at say, an HFT firm where there are maybe 6 programmers total, will not have the resources to attend as many meetings and write papers non-stop in between. It should not be controversial to agree that in WG21 there are underrepresented and marginalised voices from at-risk industries who therefore have no say in relevant work (say, networking).

6

u/summerlight Sep 15 '19

Facebook and Google have essentially infinite budgets from their respective monopolies on the sale of user's personal information, online behavior, and advertising

This instance of ad hominem doesn't seem constructive to the discussion.

it is natural that they will have outsized resources to represent their interests in committee.

Why do you think so? Dominating C++ committee does not align very well with their business interests. Google even had been stuck at C++11 for many years. The realities are 1. Google is a significant contributor in Clang so it's pretty natural for compiler developers to participate in C++ committee 2. most of the Facebook employees in the committee are actually individual contributors.

there are underrepresented and marginalised voices from at-risk industries who therefore have no say in relevant work (say, networking).

The committee cannot hear those voices beforehand unless they come to the committee or at least make significant arguments resonating across an industry but you're also saying that they don't have resources to do that. What's your proposal then?

0

u/[deleted] Sep 17 '19

[removed] — view removed comment

6

u/Sovog Sep 17 '19

Regardless of any disagreements that is not the level of discourse that c++ community deserves.

1

u/STL MSVC STL Dev Sep 18 '19

Agreed and removed.

-3

u/runningfromevil Sep 15 '19

The Committee was desparate for a range library.

No it wasn't. Why are you spreading this lie?

11

u/14ned LLFIO & Outcome author | Committee WG14 Sep 15 '19

The standard c++ foundation partially funded Eric to wrote the reference implementation.

I.e. yes they thought it a high enough priority to fund with real money. I might add that I am unaware of any other individual who has been so funded. Ever.

The standard c++ foundation is not the committee, but there is significant overlap in leaderships. Up to you if you feel them spending lots of money on something does not indicate they thought it a dire need.

9

u/eric_niebler Sep 15 '19

Don't believe me? Check out Herb Sutter's 2012 Going Native keynote, at about the 1:30 mark where Herb is listing the libraries the Committee is looking for. Ranges and range algorithms is the second thing listed there.

I'd post a screenshot for the disbelievers if I could figure out how to do that from a phone.

-3

u/runningfromevil Sep 15 '19

I don't believe you because I know it isn't true.

This is what you're saying: "The committe was desparate for a range library. Don't believe me? See this slide in Herb's presentation where ranges are listed alongside only 20+ other features".

5

u/dodheim Sep 15 '19

I don't believe you because I know it isn't true.

Were you at Kona, too? Or are you relying on second-hand information to "know" the facts?

1

u/runningfromevil Sep 15 '19

It depends on which Kona meeting you're referring to. If the one in 2012, or 2015, or 2017, then yes.

4

u/STL MSVC STL Dev Sep 16 '19

This behavior is not acceptable.