r/cpp • • Dec 28 '18

"Modern" C++ Lamentations

http://aras-p.info/blog/2018/12/28/Modern-C-Lamentations/
307 Upvotes

162 comments sorted by

View all comments

75

u/[deleted] Dec 28 '18

I’m in a similar line of work as the author, and I must say the game dev twittersphere is all up in arms about this massive groupthink about all sorts of nonsense. I would feel better about this sort of blog post if the Unity product wasn’t absolutely terrible with about the least data oriented design available (Unreal your object graph is no better). The problem with all these rants is even if there is an element of truth to them, I don’t think they are particularly effective. I’m sure if I thought for a bit I would be able to come up with plenty of cases where ranges offer better composability in a less contrived example. Is it always the first thing I would reach for? No, but I’m glad it’s going to be there for when it makes sense.

Now the part about compile times which is also the subject of another recent post from the same author... This is absolutely not the right conclusion to draw. Compile times are important, yes, but writing worse code to improve compile times seems incredibly backwards. We have things like the pimpl pattern and such for a reason. Furthermore, for those cases where we operate in massive codebases, we have other tricks up our sleeves, like defining good module boundaries and library sandboxes for testing or iterating on individual components.

If the Tim Sweeneys, John Carmacks, etc read this, please stop fueling this unproductive and heavily biased ranty holy war. I guarantee if you weighed in earlier to the committee in literally any capacity, at least a more productive dialogue may have ensued. In my case, I’ve voiced concerns to the committee before over a number of things, but within this industry I’m just one person. As for the people on the committee, I think you are better served by making the process and yourselves more approachable. Understand that for us in the trenches, it’s really tough to stomach the rigamarole needed to provide feedback on things. I remember being pretty discouraged when trying to dissuade the committee’s efforts to pursue a 2D drawing api, and I shudder to think of my industry’s backlash had it come to fruition.

The C++ community is ill and there is a large degree of separation between some of its hardcore users and its creators. The way things are, it’s tough to see things improving much, and I wish I could be more optimistic but in the worst case scenario, in the eyes of the games industry, we get an unusable form of reflection without user defined attributes, we get a networking api that isn’t performant enough to work with, a bunch of features we don’t care about because the STL is still abysmally slow (containers and IO mainly), and get alienated even further. This results in everyone being even less inclined to be cooperative on the next cycle. I know with better direction, we could be C++’s staunchest allies and supporters; I was in this camp as despite it’s flaws, it was the workhorse that could get the job done. But increasingly, my support of C++ has become more of an apologia and I am definitely looking past C++ more opportunistically.

5

u/kazum93 Dec 30 '18

I think the process of being part of the language development process should be made easier (as mentioned). Maybe there should be actually a "Q&A" working group which fixes language bugs and STL implementation concerns rather then always implementing new "awesome" features. The thing with that is who wants to spend time writing proposals for bug fixes or in general spend time to come up with solutions to problems when he or she can spend time in comming up with new features?

If the game industry has so much to complain why don't they spend time and work force (money) into the committee... Like Google google or Facebook do?

8

u/STL MSVC STL Dev Dec 30 '18

That's what CWG and LWG do when they're processing issues (versus reviewing papers).

who wants to spend time writing proposals for bug fixes

Implementers. We prefer to avoid implementing an unclear, inconsistent, or defective specification, so we are responsible for filing and fixing most issues.

If anyone is skilled in Core or Library wording and wants to help, your help would be greatly appreciated - we have a near-endless stream of issues that need "drafting" (i.e. designing and wording a fix). This can be done without attending meetings in person, but requires the highest level of attention to detail.

1

u/kazum93 Dec 31 '18

Thank you very much, if I were skilled enough I would offer my help, but I am just a game developer student. In general I was just wondering why is there not one group which has only this one job, instead of 2.

Moreover is that not sometimes the problem that members of the committee are too far away from actually average implementations?

1

u/STL MSVC STL Dev Dec 31 '18

Core Language and Standard Library wording is way too different to be handled by the same groups.

Yeah, we sometimes lack relevant real-world experience, especially in specific domains.

1

u/kazum93 Dec 31 '18

Fair enough.

In regards to the lack ... Is there a plan to tackle this? For example take out the problem to the community?