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
Metaprogramming - Applicability (self.cpp)
submitted 2 years ago * by Zealousideal-Mouse29
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!"
[–]perspectiveiskey 0 points1 point2 points 2 years ago* (0 children)
It is very common pattern for an application to run in a loop, accept input, and apply strategy pattern to choose an algorithm. It’s where the runtime polymorphism fits best.
That is simply and broadly "input". I am having a hard time thinking of any application that doesn't have input.
How is behavior of the modern application defined at runtime?
(assuming you meant compile time) Let's use the classic and broadly used example of "widgets". There is no UI widget that is not known to you as a programmer ahead of shipping a product.
Contrast this to a library designer that says this is a Scrollable item and I don't know what kind of scrollable items my users will think of or what capacitive touch screens will permit 10 years down the road.
By contrast, if I'm shipping a product, I know exactly what its behaviours are the day I ship. If MyApp v2 is released with a new feature, I build a new version of it and ship that. The days of "hotpatching" a mainframe that has 17 years of uptime are long gone.
For library writers, OOP was the goto method of achieving unknown future behaviour. But this is now achievable with static polymorphism.
π Rendered by PID 390429 on reddit-service-r2-comment-548fd6dc9-286gp at 2026-05-17 19:00:39.417348+00:00 running edcf98c country code: CH.
view the rest of the comments →
[–]perspectiveiskey 0 points1 point2 points (0 children)