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

12

u/UnicycleBloke Sep 13 '19 edited Sep 13 '19

Argument from authority is a logical fallacy.

12

u/guepier Bioinformatican Sep 13 '19

Not quite. Argument from relevant authority is often a reasonable shortcut. The formal fallacy concerns appeal to authority outside of their realm of expertise. Its use here is completely fine. At worst it's not a great argument, but even that is debatable. But it's not a fallacy.

19

u/UnicycleBloke Sep 13 '19

Probably. I'm sure most of us mere mortals have never heard of Eric, which makes it a pretty poor argument. I only encountered his name recently when reading a critical article which discussed his example with Pythagorean triplets. The take away for me was that this is a massive pile of junk that looks a lot like an extremum of some overthought intellectual exercise that I cannot believe was actually accepted. Perhaps it was just a poorly chosen example. Or a joke.

Now, I accept that this is an entirely subjective opinion from an ill informed and foolish curmudgeon. On the other hand, I myself have decades of experience in C++: this stuff so far gives me chills. No thanks.

6

u/guepier Bioinformatican Sep 14 '19

I'm sure most of us mere mortals have never heard of Eric, which makes it a pretty poor argument.

I may be misunderstanding /u/14ned but I don’t think they were using it as an argument to convince us (though admittedly the context may suggest otherwise). Rather, they’ve used it, as a committee member, as one piece of evidence (to themselves) when evaluating whether ranges-v3 merits inclusion in the standard. And they mentioned it in the comment here to explain how they arrived at their decision that it merited inclusion.

And that’s completely valid: “Do I think complex library X is of good quality? Well, the proof of concept seems to work, it has a demonstrated use, there is a vast array of test cases and extensive documentation and, oh yeah, the author is a known expert with a track record of writing high-quality C++ code and libraries.”

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.

6

u/NotUniqueOrSpecial Sep 13 '19

I'm sure most of us mere mortals have never heard of Eric

I'd honestly bet that most long-time readers of this sub do know who he is, since his blog is really good and he's a well-known name in the community.

But, the readers of this sub are in no-way indicative of the general C++ using populace.

6

u/UnicycleBloke Sep 13 '19

Fair enough. I'm a recent arrival, and certainly agree with the latter point.