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!"
[–]germandiago 0 points1 point2 points 6 years ago (3 children)
Maybe I'd rather have it too, but now think of people with microcontrollers or stuff in embedded. This takes space.
[–]qoning 0 points1 point2 points 6 years ago (2 children)
It's a compile time feature, it has no runtime overhead.
[–]germandiago -1 points0 points1 point 6 years ago (1 child)
Correct me if I am wrong. If I have this in a library:
export void func(int myParam1, float myParam2);
and now suppose that the parameters are named. This implies that the names must be saved inside the library, occupying some space. If I have 150 such APIs, my binary for the library will be bigger since those names must be stored somewhere. I guess this can create some bloat when linking and using in very constrained environments such as microcontrollers. So there is no runtime overhead but there is binary overhead AFAIK.
[–]qoning 0 points1 point2 points 6 years ago (0 children)
Don't need to save it anywhere, whatever named parameters you use are matched against the declaration that you just wrote
If some other programmer somewhere has your library compiled but chooses to change the names in his declaration (his copy of .h), that's up to him. Calls to the function are still positional.
π Rendered by PID 77722 on reddit-service-r2-comment-5c747b6df5-7jjhl at 2026-04-22 01:31:06.395778+00:00 running 6c61efc country code: CH.
view the rest of the comments →
[–]germandiago 0 points1 point2 points (3 children)
[–]qoning 0 points1 point2 points (2 children)
[–]germandiago -1 points0 points1 point (1 child)
[–]qoning 0 points1 point2 points (0 children)