Hacker News new | ask | show | jobs
by arandr0x 2727 days ago
I'm not in games but my industry is adjacent and I have the same gripes with c++. (Which the author characterized very well.) Although build and debug times definitely are an issue regardless of the performance of the hardware.

I find reading C++ "standards" papers onerous and feel like they're written in a way that's deliberately inaccessible. I don't much like the idea of going to CppCon -- even if my company funded it, which maybe they would, I feel like I'd be marginalized for not using template metaprogramming, not knowing the new hotness by heart, and generally being a proponent of C-with-classes. I just feel like so much of the C++ "standards" work feels like it's led by academics who think the concerns of working programmers like me are beneath them.

Is there a way I can "get involved" and does my voice have any value?

6 comments

If you want to get involved and for your voice to have value then you have to educate yourself on the subject. Unfortunately too many of my former colleagues in the games industry (I'm now in a "games adjacent" industry too) fail to do this before complaining about C++ and have the same attitude of "it's not fair that I should have to know what I'm talking about before anyone will listen to my complaining seriously".

Videos of all CppCon talks from the last several years are freely available on YouTube and if you took the time to watch them you'd see that many of them are by working programmers and not academics, quite a few of them in the games industry. You'd also learn that the committee is quite focused on simplifying the use of the language and on finding more usable ways to get the benefits of template metaprogramming. You would also find explanations of many features that are more accessible than standards papers and occasional explanations of why standardese is the way it is - nobody, even the most academic speakers, claims to find the standard the most accessible way to learn about a new feature.

>"it's not fair that I should have to know what I'm talking about before anyone will listen to my complaining seriously".

In a way it isn't fair. Most users of most programming languages don't know the language very well. So the views of these programmers are important.

I've never really bought this argument. If you want to contribute to theoretical physics and be taken seriously it's expected that you have a solid grounding in physics. This principle is generally fairly widely applied. There are people on the standards committee who represent their companies and part of their role is to speak for the needs of the 'regular' programmers at their companies who may not be as well informed on the language - Titus Winters from Google takes that part of his role seriously. Bjarne Stroustrup teaches C++ to many students and one of his big focuses is on simplifying the language for beginners. To do a good job of simplifying something though you actually need to understand the problem space very well. Simple ain't easy.

If someone wants to represent the 'average' programmer then the best way to do it would be to educate themselves on the language and the current state of standardization and then participate as an advocate for those programmers.

I wasn't talking about participating directly in the standards committee (and neither was the OP).

It seems that the people who are supposed to be speaking for the regular programmers aren't doing a particularly good job.

> It seems that the people who are supposed to be speaking for the regular programmers aren't doing a particularly good job.

I agree with this. The people at CppCon are very smart, very informed, and very very pro-C++. It's silly to think that such a person (people on the committee, no less), would be a good spokesperson for your everyday programmer.

However, that's certainly not the main problem keeping C++ complexity high. Even though the committee genuinely wants improvement in this area, there is too much fear of breaking legacy code, and too many early design mistakes to overcome on the path back to a simpler C++.

It does seem that it seems that way. As someone who's pretty familiar with the current state of C++ and also has a long history in the games industry however I don't believe it actually is that way. I think the problem is more one of perception than reality but many of the complaints come from people who don't know what they don't know and I'm not sure the best way to fix that problem. The resources for them to educate themselves are freely available but a certain subset of them seem weirdly proudly stubborn about maintaining their ignorance.

I'm not personally that interested in making it my mission to help educate people who don't want to be educated but perhaps it would be a valuable way for someone to get involved. People complaining on the basis of wrong information or misunderstandings aren't likely to be taken terribly seriously though.

You're very quick to call people ignorant and make uncharitable assumptions about their motivations. If your attitude is the common one, then it does seem that the opinions of regular C++ programmers are not valued by the people involved in the standards process.
I've read some of the drafts and the final spec of the APIs I care most about, for example, the concurrency API (which I like a lot... I'm not solely complaining!). Do I need to watch every talk on every C++ feature before anybody in the C++ community will want to talk to me? Because I'm paid to actually write code. (I mean normally. Today my boss isn't back from vacation so you get to read my rants on HN.)

Here are the C++ subjects of interest to me:

* geometric primitives. Not having basic geometry by now is insane.

* concurrency, I think the API as it is is good, but some of the APIs around atomics (mostly the difference between compare_exchange_weak and compare_exchange_strong) are not clear, I have had to explain those to coworkers before. Why can't we have something called test_and_set like on atomic_flag that's an OK default? Also, while I perfectly understand why that's the case, atomics have deleted copy constructors and that tends to generate compiler errors. I don't get why compilers can't just generate default constructors that don't copy the atomic like all my coworkers keep having to write and potentially introduce errors in

* filesystem API, very excited for that but sort of worried it will not work on every platform and especially that it'll work terrible on windows. I have to write Windows/Linux/iOS/Android C++ so a bunch of my gripes are "the standard is inconsistently supported" and I supposed that's not the job of the standards committee to enforce... but maybe they could stop inventing new stuff for Microsoft to screw up...

* few other misc things. The fact X const& and const X& are both valid leads to every project having its own "standard" of const placement and it's not great to read, etc. not major stuff. But things that are of concerns to working programmers.

I'm not really complaining, I love C++ and being a C++ programmer and you couldn't pay me enough to go integrate idiosyncratic web frameworks. However I think you must admit that the C++ community, beyond the language itself, is a little exclusive and not super friendly to people who are not as knowledgeable as others. I have a little time to learn some of this stuff, and I would be happy to, but I will never be an expert like most of the standard committee is. Based on your message I think that makes me and my opinion not welcome? If so that's OK, but, um, there's a lot more of me than there are of them in this industry.

(edited for formatting)

On the X const& and const X& issue, I wish that everyone would use X const& and never const X& - it would make the rule that "the thing on the left is the subject of the const" much easier.
The standards committee is a volunteer effort. Some of the most active participants have employers who consider their involvement as part of their job responsibilities so they are at least partly being sponsored by their employers but plenty of people involved in the standardization process and attending conferences are not paid by anyone for their participation and are in fact paying the costs of attending out of their own pocket. Hardly anyone in the C++ community is directly paid to sit around learning more about the language. If you wanted a career where you didn't have to put in learning on your own time to keep your skills current I think you picked the wrong one.

It's a fairly involved process to get a new library standardized. Functionality that's not included in the standard library may be missing because it's hard to get agreement on what is required, because there isn't anyone sufficiently motivated to drive it through standardization or because the committee just hasn't got round to it yet.

I don't consider this particularly problematic in many cases. Some functionality probably shouldn't be part of the standard IMO. For example, there's been some effort to standardize a 2D graphics library and I'm of the opinion that should not be part of the C++ standard. I'm inclined to think the same thing for geometric primitives, for similar reasons. Certain types of library are better left to competing open source libraries for now I believe.

Implementations are not the domain of the standards committee. It's rather inconsistent to demand relatively niche new library functionality for geometric primitives at the same time as wanting the committee to stop adding things to the standard faster than Microsoft can keep up however.

Concurrency is complicated and there are a lot of pitfalls which the standard library has gone to great lengths to avoid. It sounds like you're misunderstanding the best way to use atomics but without knowing more about your use case I'm not clear exactly how.

Coding standards are not really the domain of the standard and some things that have multiple possible ways to write them have to be maintained for backwards compatibility. If you want to standardize things like const placement however, tools for automatic formatting and transformation of C++ are getting better all the time thanks to clang/llvm.

C++ occupies a niche which necessitates it being a bit less beginner friendly than some languages and a bit more demanding on users putting in the effort to learn the language. That's what makes it fairly uniquely suited to certain use cases. I don't see that as a bad thing. I don't really know what you're asking for to be honest. My advice to anybody who uses C++ as a major part of their career to invest a decent amount of time into learning it better though, just as I'd advise them to spend time learning more in any domain that is a big part of their professional life.

Thank you for replying in-depth, I didn't expect it. I actually agree with you re: 2D graphics(I was aware of it already), I just think geometry is different because it has wider applications. Your viewpoint is consistent though.

Again, I think concurrency is one of the parts the standard library does best. (And I think part of the specifics of this is it has primitives like async and future that are higher level and are much easier to explain. I happen to write lock free data structures often enough that finding blog posts at a good level to explain the API for atomic to my code reviewers is a need/bother for me, but there are also plenty of concurrency use cases where I don't need atomics, and I also read that there was a plan to allow parallel execution for most of the algorithms in the standard lib, I don't know if that's in MSVC yet but that's an example of things I like).

I don't blame the standards committee for implementors. In general, it must be terribly difficult to be on the standards committee, and have to deal with stuff implementors have already done, stuff they won't do, and stuff they are telling you they are doing but will not do right in the end. OTOH, as a end user, you have to understand that I have to deal with implementors, and they affect how I think of a given C++ feature, some of which look awesome in the text but are impractical because of implementor differences. I'm not alone: every C++ dev I know has a subset of C++ features they have deemed "practical", based on things like implementation performance, compiler error messages, how many characters the function names have, etc., and part of the problem is it's not the same subset for all C++ devs. Sometimes I wonder if there shouldn't be a subset of the standard (and I don't mean the C subset!) that's earmarked as beginner-safe and compilers could enforce the, well, beginner-safeness of code that is meant to be foolproof... but I suppose your angle is code meant to be foolproof should either never allow a beginner within 50 feet of it or be written in Java (or Rust?). Which, I get.

I would like to clear up a misunderstanding that I think you had: I do not spend zero time learning about C++. I'm not super confident and I think by HN standards I am not very experienced in C++ (or anything else), I'm definitely not at the level where people at CppCon would want me in the room, but people at my workplace do come to me for help with that stuff a bunch of the time. I tend to volunteer to explain newer or more complicated parts, etc. I'm a mid-level dev generally and C++ is my main language, and I'm not significantly more ignorant than my coworkers about it. If that is below the threshold at which you will consider someone worthy of talking about C++ on the Internet, maybe that's why C++ doesn't have that many beginner-friendly communities around.

I have no threshold for when someone is worthy to talk about C++ on the Internet. What I don't particularly like is people complaining about things they don't seem to have made much effort to understand. I'm happy to answer questions for people who genuinely want to learn about C++ (my top 5% ranking for C++ answers on Stack Overflow attests to that I think).

There's never been a better time to learn C++ - there's a wealth of free resources online from conference videos to blogs to podcasts like CppCast. C++ standardization is more active than ever and the language is getting better with each update to the standard and there is a real effort to also make it simpler which I believe is mostly succeeding. Implementations have also improved a lot in recent years. It's just the pace of change is such that there is work to do to effectively communicate that fact to people who don't pay much attention to the development of the language.

I think if you want a long term career in this industry you need to dedicate at least ~5 hours / week of your own time to professional development on an ongoing basis. If you work with C++ on a daily basis then spending some of that time working through CppCon videos (I like to watch at 1.25x speed) and other free online resources is a good idea IMO. I'd also advocate writing a bunch of small programs from scratch to explore unfamiliar features or libraries. Working through programming interview type problems can be good practice, or just try things out to satisfy your own curiosity. I'd say getting in the habit of writing a small program to experiment with something new was the biggest factor in increasing my comfort level and understanding of the language.

> I think if you want a long term career in this industry you need to dedicate at least ~5 hours / week of your own time to professional development on an ongoing basis. If you work with C++ on a daily basis then spending some of that time working through CppCon videos (I like to watch at 1.25x speed) and other free online resources is a good idea IMO.

Then I know what I'm doing tonight. I like the computational geometry aspect much better than the programming language part. The thing with C++ is very often the stuff you don't know sneaks up on you at the worst time when starting on a new library, or trying to reuse code more complex than you're used to. It's strange to think of it as something to study, but 5h/week is something I could do instead of more overtime.

>What I don't particularly like is people complaining about things they don't seem to have made much effort to understand.

The main thing I was complaining about was C++ takes (relatively to e.g. Python) a ton of work to understand accurately, but also to explain properly to other people. You must know that from answering on StackOverflow too. (There are features of C++ I don't use because I/my coworkers don't yet know them, and studying will help me with that, but I can't complain about them yet!) StackOverflow is actually great for C++ though, so thank you for answering on it. Usually there's always an answer with a detailed explanation even for strange code samples. Often it's through reading the other people's questions that I can understand how a construct can be useful in practice.

I find reading medical "standards" papers onerous and feel like they're written in a way that's deliberately inaccessible. I don't much like the idea of going to Medical Conferences -- even if my company funded it, which maybe they would, I feel like I'd be marginalized for not knowing basic medical techniques, not knowing the new hotness by heart, and generally being a proponent of bleeding with leeches. I just feel like so much of the Medical "standards" work feels like it's led by academics who think the concerns of people that don't know medicine like me are beneath them.

Is there a way I can "get involved" and does my voice have any value?

You're being flippant, but your paragraph is the reason we have pharmaceutical sales reps, and the reason they are so well paid.
Except the information to inform himself is everywhere. All the CppCon talks are on YouTube. There are tons of great resources for learning modern C++, or learning about what's going on in the C++ world - there are plenty of teachers, among them even Stroustrup. If he isn't interested in putting in anything more than zero effort into defeating his own ignorance, why should anybody else care about him?
I've since taken the advice on the other threads and watched more CppCon talks -- I think my problem is I used to google new features and find talks on them, and they were features that were too advanced for my understanding, and that made me think every talk was like that. I've watched a few talks now that are both exactly relevant to what I do and completely understandable. So, I'm glad that in this specific case ranting on the Internet had the effect that I got new motivation to try harder to find talks that were for me. I don't comment on any other website than here and now I know why. I have never had in person a conversation with anybody about C++ that has taught me more than an evening of these talks. I still don't feel I'm ever going to be able to do anything about when C++ is frustrating to my workflow, but at least I have more tools to sidestep the frustrating parts. I wanted to give an update so people would know that the advice was actually really good, and that the talks even though they're hour long, are very dense in information.

That said, you (and several of the other posters) are being awfully dismissive of the notion that there are people who work in your language but don't feel confident with it. I may have major imposter syndrome or something but I've (before this weekend) thought if I didn't get a talk at first it meant I was too stupid for all talks. I don't have mentors at my company because most senior developers have other subjects of expertise than C++, which is just a tool to us. My city has several Javascript meetups but nothing on C++. And I think the way I've been treated when saying, essentially, relative to the C++ community, "I use C++ every single day but I don't think I'm one of them", which is being told, "you're not good enough/disciplined enough/confident enough to be one of us", shows that.

Most of programming is slowly waking up to the idea that being exclusive and giving people tough love instead of guidance is starving companies out of potentially good developers. I know my coworkers and most of them would give up on a learning resource that they felt was too advanced and would be turned off from any effort if all everyone was telling then was "try harder". (Even though in this case trying harder is 100% the solution.)

In most other fields, including medicine, there are high-EQ people hired to fix exactly that, by bridging the gap between where the practitioners currently are, and where the industry wants them to be, usually in a way that's either very high touch or very structured. And in those other fields, if most practitioners aren't reached by the information, or are consistently misapplying it, the industry guilds put the blame on the way their information is being transmitted, not on the practitioners.

Upvoted. And I just want to say I agree completely. Your comments re: "not knowing the new hotness" and "led by academics who think the concerns of working programmers like me are beneath them" really strikes a chord with me. I think this is a problem in all of programming these days and has really soured me on the industry.
I was in an IST 5/-/21 committee meeting last month, and sat next to committee members who were talking about the same things as you are. None of them came from academia.

The truth is that C++ standardization is not full of "academics", and people involved voice these same concerns.

One of my fellow committee members, Guy Davidson, is in the games industry, and the subject of the 2D graphics proposal has been a regular topic at our meetings.

* http://cppcast.com/2018/07/guy-davidson/

* http://jdebp.uk./FGA/cxxpanel.html

* http://cxxpanel.org.uk/

I'm not a fan of the 2d graphics proposal, some for reasons specific to it (I think it's too like the HTML5 Canvas API) some for more philosophical reasons like 2D graphics is a big subject that may not be possible to standardize in a way that pleases enough people. It's true that the existence of the proposal demonstrates the committee has realized graphics programmers had needs! The discussion around it too does a lot to put the kind of problems we have to work with on the map.

Anyway, originally in my OP, I read the blog post and at the end, he was saying to people that have any industry-specific concern with the way they use C++, and the way C++ is changing, to get involved. I was just saying, as a C++ end-user, even one who cares enough to write this, there is no readily accessible way to do that, because I don't work with anyone who's already on the committee nor at Microsoft. So it feels a bit like an empty rebuttal on his side. Writing this here, it's basically the longest discussion I've ever had my whole career with people who really know deep things about C++ and the process it's made by. I'm glad for it but I'm clearly not the demographic the original blogger was addressing! Even though I definitely feel those same issues he outlines.

The end of the blog literally lists some ways it's possible to get involved without already being best friends with Herb Sutter. I'm not sure what else you need. An engraved invitation?

https://groups.google.com/a/isocpp.org/forum/#!forum/std-pro... https://groups.google.com/a/isocpp.org/forum/#!forum/sg14

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ All the papers here provide the email address of the author, so you can contact them if you have concerns.

https://isocpp.org/std

Off-topic but can you recommend any resources off-hand for improving in your preferred C++? I share your approach but have a heck of a time finding quality books and such. (Email in profile if preferred.)
I enjoy Yossi Kreinin's blog [1] and The Old New Thing [2]. I don't read programming language books, which I usually find to have little good industry knowledge and to be too detail oriented and easily out of date. Although K&R (the one about C) is a great book that's exactly the right size and the examples from the Gang of Four book are actually very on point.

Most often I learn code by reading code. OpenSceneGraph is an example of an open source project that has modern ish C++ but no deliberately abstract misdirection. Open source usually does not have super clean code but it's a good way to sample the variety of structures you can find in a project. Of course the classics (sqlite and the Linux kernel) are much too C-like for where I'm getting at but they are still full of lessons for how to organize modules and APIs, how many arguments to pass and where, where to park I/O code, that sort of thing.

I posted it here for the benefit of HN readers who may have the same question but I'll write you an email too so you can share what you want to improve and such. There aren't many C++ programmers left in the HN-reading, not just punching a clock demographic, and I kind of miss talking to people who get that. Like the prototypical game dev in the article I go to one conference a year, and it's not about C++.

[1]: https://yosefk.com/blog/ [2]: https://blogs.msdn.microsoft.com/oldnewthing/

It's nice to hear this kind of concerns; don't be afraid! At last, C++ committee members are just people like you, hopefully nicer than expectation.

> I find reading C++ "standards" papers onerous and feel like they're written in a way that's deliberately inaccessible.

Sadly, it's somehow true; standard wordings are typically not readable for laypeople because its primary purpose is unambiguous specification but not education. Generally, I find that it's a good idea to avoid "wording for ~~" proposals if I haven't followed that specific line of proposals from its beginning.

But many proposals are still fairly readable technical papers; for instance, Herb Sutter's proposals are generally easy to follow. (ex. https://wg21.link/P0709)

> I feel like I'd be marginalized for not using template metaprogramming, not knowing the new hotness by heart, and generally being a proponent of C-with-classes.

https://www.youtube.com/watch?v=rX0ItVEVjHc

Don't worry. Mike Acton is not known to be a strong proponent of "Modern C++", but his session[1] is one of the most popular CppCon video on Youtube. Even if you don't like templates, people will generally respect you.

> I just feel like so much of the C++ "standards" work feels like it's led by academics who think the concerns of working programmers like me are beneath them.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/n479...

You can find the list of the participants for the last meeting. Most of them are just engineers and even Bjarne is now working for Morgan Stanley (I think most of "designed by Ivory Tower" concerns can be generally credited to Bjarne being a professor before) They're just writing C++ code as their daily job like you (and very likely suffering from C++ as well). That's why they're writing proposals to improve the language.

Some tangential story: except for few exceptions, PL academics are generally not working on languages like C++ because it typically doesn't align well with their interests. Usually they tend to use more elegant, academic friendly languages like Haskell or ML. Or even fancier languages like Coq, Adga, Idris, depending on topics. Or design their own languages. For formal verification researches, maybe C or Java. But C++ is typically considered as a complex, inelegant beast for researches.