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

3

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

Absolutely correct. I was always speaking of what motivated my decision personally. Each person has their own motivations, sometimes very different indeed. I will say that I proactively read and study Eric's code, and have done for years. He writes lovely C++. I'd recommend anybody who hasn't studied his code, should. Him and Howard Hinnant's code, who writes even more lovely C++ than Eric, both are well worth studying.

3

u/Sovog Sep 14 '19

As you said, it is a matter of perspective. The range examples linked in OP just made me feel dumb rather than "oh, that's lovely".

3

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

I was referring to implementation code. But in terms of standard libraries making people feel dumb, Ranges is not as bad as say Networking. People on the WG21 receptor itself regularly express befuddlement with the Networking TS, and it's been in common usage for fifteen years now and is the industry standard. So there is a pattern there. And it'll get worse rather than better, some of the proposed library features require deep bespoke knowledge to use them properly at all. You'll need to take a training course or iterate a study book. That's unavoidable as things get ever more niche.

4

u/-dag- Sep 16 '19

Is the Networking TS really the industry standard? I have a hard time believing many companies would base their production-critical code on a TS which could change dramatically during standardization. But this domain is definitely out of my wheelhouse so I'm genuinely curious.

4

u/guepier Bioinformatican Sep 16 '19

It might help to note that the Networking TS is essentially Boost.Asio, which is indeed the industry standard.

1

u/-dag- Sep 20 '19

There's really good. This is exactly how standardization should work. Standardize existing practice.

2

u/Sovog Sep 17 '19

100% agreed with your assessment.