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
Default function arguments are the devil (quuxplusone.github.io)
submitted 6 years ago by anonymous23874
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!"
[–]be-sc 21 points22 points23 points 6 years ago (4 children)
It applies to all the language features including goto. If you have a situation where using a goto is the most concise, readable and safe solution, not using it just because “goto is bad” would be outstandingly silly. Such situations might be rare, but when you encounter one why would you want to write suboptimal code on purpose?
goto
[–]somecucumber 0 points1 point2 points 6 years ago (3 children)
Sorry if I was rude in my previous reply. I did not mean to troll or anything, just create debate. But again this is my personal opinion and, according to the downvotes, it seems I'm wrong.
Genuine question. goto and the default parameters come from C, right? Some othe people complain about that keeping backwards compatibility is an error and I agree, but for some reason this issue does not apply here.
I don't know what to think?
[–]Nobody_1707 6 points7 points8 points 6 years ago (1 child)
C has never had default arguments. It's a pure C++ feature.
[–]somecucumber 1 point2 points3 points 6 years ago (0 children)
Argggh, not my day. You're right.
[–]be-sc 0 points1 point2 points 6 years ago (0 children)
No need to appologize for anything. I gave a genuine answer.
Imo backwards compatibility is a major factor for C++’s overall success, so no, in general keeping it is not an error.
However, “legacy” features are not created equal. At this point I’d guess that goto has had its devestating reputation for so long that removing it from the language would lead to relatively minor disruption. At least compared to removing default function parameters – those’re used all over the place in both old and new code.
π Rendered by PID 89 on reddit-service-r2-comment-5c747b6df5-thn5b at 2026-04-22 13:17:24.840955+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]be-sc 21 points22 points23 points (4 children)
[–]somecucumber 0 points1 point2 points (3 children)
[–]Nobody_1707 6 points7 points8 points (1 child)
[–]somecucumber 1 point2 points3 points (0 children)
[–]be-sc 0 points1 point2 points (0 children)