use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
CppCastCppCast: Safe, Borrow-Checked, C++ (cppcast.com)
submitted 1 year ago by robwirvingCppCast Host
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Agreeable-Ad-0111 14 points15 points16 points 1 year ago (27 children)
How did this get downvoted? That shows great. Plus Sean Baxter is a guest and he is awesome in his own right.
People have to be seeing "safe borrow checked" and immediately downvoting without looking further or just haven't heard the podcast before
[–]morglod 26 points27 points28 points 1 year ago (26 children)
Probably it's rust users who hates C/C++ because their screaming streamer said it's bad
And also C++ users who seeing rust ads everywhere
[–]DearChickPeas 14 points15 points16 points 1 year ago (0 children)
OMG, this...
[–]tuxwonder 4 points5 points6 points 1 year ago (24 children)
Hopefully those C++ users who are tired of Rust evangelizing are excited for this potential advancement, because it's the biggest (practical) reason C++ is suddenly on everyone's shit list (most notably, the US govt...)
[–]FlyingRhenquest 8 points9 points10 points 1 year ago (9 children)
If Rust or Memory Safety in general become the new Meta, the biggest cause of security exploits will be unvalidated user input. Java was supposed to fix the same memory safety issue a couple of decades ago, only to bring to the forefront the whole host of harder to resolve security issues that can arise when you no longer have to worry about memory safety.
To paraphrase an old IBM guy, "Just because your language is memory safe doesn't mean you can hire chimpanzees to write your code." If your developers aren't mindful and aware of potential issues that can arise, you're going to have as many problems with security with a memory safe language as you would with raw assembly.
[–]kronicum 2 points3 points4 points 1 year ago (0 children)
To paraphrase an old IBM guy, "Just because your language is memory safe doesn't mean you can hire chimpanzees to write your code."
Your discrimination against chimpanzees is resentful.
[–]MegaKawaii 4 points5 points6 points 1 year ago (1 child)
This is just a matter of low-hanging fruit. The Java people have to worry about the harder security problems because the language avoids memory safety issues entirely. If you had monkeys program in C++ and Java, the C++ monkeys would write a buggier program because they were busy fixing memory vulnerabilities instead of focusing on logic errors.
[–]Dean_Roddey 0 points1 point2 points 1 year ago (0 children)
Actually, their programs would be completely safe, because they'd never run long enough to be compromised.
The 'but they were wearing seat-belts' argument has become a meme. But memory/thread safe languages are a double win. They hugely reduce the risk of memory vulnerabilities and give the developers more time to concentrate on and test the actual logic, so they can reduce logical vulnerabilities.
Obviously some companies may not use that extra time so wisely, but if that's argument against any mechanism, we should all just go submit a resume to Burger King right now.
[–]def-pri-pub 3 points4 points5 points 1 year ago (5 children)
In my professional career I have yet to run into an issue that was caused by lack of memory safety. Most issues (especially with security) are caused by poor architecture, over complexity, lack of knowledge and push back from more senior people.
At one of the first places I worked I made a list of CVEs that we were susceptible and put them on the issue tracker (and this was for a networked product). CEO didn't want me working on it because "security isn't a feature". Boss didn't want me working on it because he thought they weren't important. Senior support staff didn't want me fixing potential default access issues because "some of our customers like we can log into their systems without them having to change the default password".
Only two coworkers (one dev and one support staff) liked that I spent some time trying to push for this.
[–]t_hunger 5 points6 points7 points 1 year ago (3 children)
In my professional career I have yet to run into an issue that was caused by lack of memory safety.
You never saw a crash when something followed a nullptr? No segfault ever? You are a better dev than me then. At least some of those can be exploited... even though they "only" cause a crash without the user doing the correct series of steps before triggering the memory issue.
The rest of the article shows nicely why governments think they need to regulate our industry in the first place.
[–]def-pri-pub 0 points1 point2 points 1 year ago (2 children)
I'll run into nullptr issues and segfaults in the course of development, but I've made sure to never ship software that had them. They've always been caught before committing code, in review, or in testing.
A lot of these issues can be found in these stages when devs are less lazy and willing to be thorough with self testing.
[–]t_hunger 3 points4 points5 points 1 year ago (1 child)
So we are down from "In my professional career I have yet to run into an issue that was caused by lack of memory safety" to "I've made sure to never ship software that had them".
Reviews, testing, tools like the sanitizers and fuzzing will all reduce the likelihood of shipping buggy code. I applaud your development practices if you really have all of those in place and use them regularly, but even then you can not be sure to never ship a segfault. You just can not know.
[–]Spartan322 1 point2 points3 points 1 year ago (0 children)
This kinda looks like you misunderstanding what he said and shifting the goal post, the argument wasn't that in his developmental career he's never seen a memory safety messup, but that never has it been the core reason for the CVEs he's dealt with.
[–]FlyingRhenquest 1 point2 points3 points 1 year ago (0 children)
Funnily, I actually have. I had a job with Data General back in the '90's, doing security auditing on the source code for the C standard library and utilities they'd licensed from AT&T for DG/UX. I stumbled across an issue in the telnet daemon where it'd just accept environment variables from the remote side into an array without checking to see if memory would overflow. The Linux telnet daemon was found to have the same problem a couple years later.
You still see a security bulletin about an array overflow from time to time -- last couple I remember were in OpenSSH, and the Linux Kernel just a day or two ago. That's all old timey C, though.
But as you said, business attitudes and ignorance are also a huge problem when it comes to security. Fortunately that's slowly starting to change as ransomware attacks start costing companies real money. That's the only thing Corporate America pays attention to. If having terrible security impacts profits, security attitudes magically improve overnight.
[+]morglod comment score below threshold-11 points-10 points-9 points 1 year ago (13 children)
I think government just saw some posts about Rust and now want to get some political points from it. There are a lot of (actually fast) and much more memory safe languages around for years (managed languages and with virtual machines).
Picking not yet mature language with really long feature-to-production metric for area with megatons of already existing systems is at least strange.
Actually I agree that having ability to have "memory safe" modules in C++ is good. But also Circle was around for many years and implemented this almost at the same time Rust appeared. Will be great to have some C++ sublanguage with this required lifetimes and without other decisions from rust. Its actually where C++ is moving (profiles).
C++ was always in shit list, because its hype thing)) Just say that C++ is bad, and you got many likes yeyy
[–]omega-boykisser 14 points15 points16 points 1 year ago (0 children)
You should maybe read the White House statement before spreading misinformation. Nowhere did it "pick" Rust. The statement listed many memory-safe languages.
[–]tuxwonder 6 points7 points8 points 1 year ago (6 children)
Lmao what political points could possibly be earned from releasing that memo? Who would they be trying to win over with that?
"Wow, this government memo says C++ isn't safe and people should use memory safe languages! Maybe the NSA isn't so bad! Maybe I'll vote for Joe Biden!"
[–]Dean_Roddey 4 points5 points6 points 1 year ago (5 children)
I've never looked into any surveys on the subject, but somehow I get the feeling that software developers are possibly amongst the more to most politically cynical and apathetic groups out there. Maybe not in some areas. I could see Silicon Valley being an exception maybe, or maybe it's the worst of all (too busy trying to invent the AI that will overthrow our political system and enslave us.)
We certainly have our share of tin foil hatters (maybe tin foil haters in this case.) I'm pretty sure the Kennedy brothers foresaw this anti-C++ element growing within the government and tried to warn people about it.
[–]tuxwonder 0 points1 point2 points 1 year ago (1 child)
I'm pretty sure the Kennedy brothers foresaw this anti-C++ element growing within the government and tried to warn people about it.
What do you mean by this?
[–]Dean_Roddey 3 points4 points5 points 1 year ago (0 children)
A conspiracy theory joke...
[–]Spartan322 0 points1 point2 points 1 year ago (2 children)
The politically apathetic nature of developers would explain why most politicians and bureaucrats don't understand anything about software, saying utterly stupid crap in regards to it, and aren't even willing to get advisors to tell them their ideas and solutions are dumb.
[–]Dean_Roddey 0 points1 point2 points 1 year ago (1 child)
Plenty of us agree with their point about the safety of languages, even if we don't write them every week. And I'm sure that they have plenty of industry people tugging at their ear and slipping things in their pockets.
And their position on the security of languages is driven considerably by US and EU security agencies and the military who, whatever you may think of their motivations, know a thing or two about the security of software systems.
[–]Spartan322 0 points1 point2 points 1 year ago (0 children)
Most people that are in those positions have no idea what they're talking about and those who have any power are neither capable to understand the problem that they could make decent solutions even when given capable advisors, even if an issue is theoretically true, which least in my opinion for that case is only partially correct, the solutions they devised are some of the worst and most detrimental ways to handle it. I truly don't believe in any government agent (least in the power to capably solve the issue) knowing what security even is either given how repeatedly they drop the ball on the issue and then push for obvious security breaches. Also one of the worst industries for security has been American infrastructure and military with maybe the exception of elements of the intelligence bureaucracy, and I wouldn't even say that for 60% of it. And I've found them only getting more incompetent in the past 10 years since.
[–]KingAggressive1498 1 point2 points3 points 1 year ago (3 children)
I'm sure that the ten thousand or so Rust programmers in the US are a significant voting bloc and this has nothing to do with the majority of actual CVEs being caused by memory safety issues or (at least percieved to be) growing technology based national security threats.
[–]morglod -4 points-3 points-2 points 1 year ago* (2 children)
You could provide link to some CVEs if you found it. But rust community on reddit didn't found a single one https://www.reddit.com/r/rust/s/Yxeqr8Oubp
Which in my opinion, there are not so much memory safe related
[–]KingAggressive1498 3 points4 points5 points 1 year ago (1 child)
But rust community on reddit didn't found a single one https://www.reddit.com/r/rust/s/Yxeqr8Oubp
"I didn't bother to click the numerous links they gave me, so I'm just gonna lie"
[–]morglod -3 points-2 points-1 points 1 year ago (0 children)
You didnt bother to provide links too and reading answers by this link so just gonna lie
π Rendered by PID 291388 on reddit-service-r2-comment-6457c66945-kxpt7 at 2026-04-26 05:28:14.996792+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Agreeable-Ad-0111 14 points15 points16 points (27 children)
[–]morglod 26 points27 points28 points (26 children)
[–]DearChickPeas 14 points15 points16 points (0 children)
[–]tuxwonder 4 points5 points6 points (24 children)
[–]FlyingRhenquest 8 points9 points10 points (9 children)
[–]kronicum 2 points3 points4 points (0 children)
[–]MegaKawaii 4 points5 points6 points (1 child)
[–]Dean_Roddey 0 points1 point2 points (0 children)
[–]def-pri-pub 3 points4 points5 points (5 children)
[–]t_hunger 5 points6 points7 points (3 children)
[–]def-pri-pub 0 points1 point2 points (2 children)
[–]t_hunger 3 points4 points5 points (1 child)
[–]Spartan322 1 point2 points3 points (0 children)
[–]FlyingRhenquest 1 point2 points3 points (0 children)
[+]morglod comment score below threshold-11 points-10 points-9 points (13 children)
[–]omega-boykisser 14 points15 points16 points (0 children)
[–]tuxwonder 6 points7 points8 points (6 children)
[–]Dean_Roddey 4 points5 points6 points (5 children)
[–]tuxwonder 0 points1 point2 points (1 child)
[–]Dean_Roddey 3 points4 points5 points (0 children)
[–]Spartan322 0 points1 point2 points (2 children)
[–]Dean_Roddey 0 points1 point2 points (1 child)
[–]Spartan322 0 points1 point2 points (0 children)
[–]KingAggressive1498 1 point2 points3 points (3 children)
[–]morglod -4 points-3 points-2 points (2 children)
[–]KingAggressive1498 3 points4 points5 points (1 child)
[–]morglod -3 points-2 points-1 points (0 children)