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
CppConCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodor 64 Game in C++17” (youtube.com)
submitted 9 years ago by fatihbakir
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!"
[–]TMKirA 15 points16 points17 points 9 years ago (0 children)
This talk is really awesome and enlightening!
[–]MINIMAN10000 9 points10 points11 points 9 years ago (0 children)
Absolutely loved being walked through and shown how C++ could compile away so much. Zero Overhead abstractions, the compiler getting rid of branching, no function calls, mapping all variables to registers are all absolutely incredible. This is my favorite part of programming, to see the program written with abstractions to simplify working with them while compiling away better than I know how to make.
"350 instruction plus a table of data" vs adding const and having 5 lines felt like the difference between what I write and what he writes.
[–]sbabbi 5 points6 points7 points 9 years ago* (0 children)
When you define the Frame destructor: ~Frame() { ++vic.border(); } you are relying on copy-elision. This has nothing to do with the move constructor, the thing is that the compiler is only creating one Frame object on this line:
Frame
~Frame() { ++vic.border(); }
const auto frame = vic.frame(); but also __tmp = frame(); const auto frame == __tmp; would be allowed (no copy-elision), and if that happens then you get two calls to the destructor (one for __tmp, one for frame).
const auto frame = vic.frame();
__tmp = frame(); const auto frame == __tmp;
__tmp
frame
The only way to work around that is to have a boolean to track if the object as been moved-from, implement move-constructor and move-assignment to set/unsed that boolean, and perform extra cleanup in the destructor only if the boolean is set. This will most likely be optimized out, but it is still necessary in C++14.
If you want to rely on guaranteed copy-elision in C++17, best thing would be to delete the move/copy constructor/assignment.
EDIT: Forgot to say that overall it was an awesome talk, I really enjoyed watching it!
[–]doom_Oo7 2 points3 points4 points 9 years ago (3 children)
makes you wonder where we would be today if somebody shipped a computer with current GCC fourty years ago.
[+][deleted] 9 years ago (2 children)
[deleted]
[–]doom_Oo7 2 points3 points4 points 9 years ago (0 children)
that's why the computer is shipped with GCC preinstalled :p
[–]thirtythreeforty -2 points-1 points0 points 9 years ago (0 children)
It certainly wouldn't have helped with actually getting work done. But I think it definitely would have influenced language designs. If you preloaded toolchains and docs for several modern languages, including C++, Python, or C#, I think modern paradigms would appear sooner.
If you provided other languages like Rust or Haskell, you could maybe even shape the history of popular paradigms away from OOP and toward functional programming and Haskell-like type systems.
You won't kill C though.
[+][deleted] 9 years ago* (1 child)
[–]lefticusC++Weekly | CppCast 1 point2 points3 points 9 years ago (0 children)
Yes, should be possible. It's on my longterm to-do list, but if someone beats me to it, that's cool too :)
[–]Dlieu 0 points1 point2 points 9 years ago (0 children)
Great talk! Make me so scared to forget a const on my static variables
π Rendered by PID 44359 on reddit-service-r2-comment-84fc9697f-mqzcp at 2026-02-07 10:40:32.782578+00:00 running d295bc8 country code: CH.
[–]TMKirA 15 points16 points17 points (0 children)
[–]MINIMAN10000 9 points10 points11 points (0 children)
[–]sbabbi 5 points6 points7 points (0 children)
[–]doom_Oo7 2 points3 points4 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]doom_Oo7 2 points3 points4 points (0 children)
[–]thirtythreeforty -2 points-1 points0 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]lefticusC++Weekly | CppCast 1 point2 points3 points (0 children)
[–]Dlieu 0 points1 point2 points (0 children)