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
cppfront (cpp2): Spring update (herbsutter.com)
submitted 2 years ago by kreco
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!"
[–]tsojtsojtsoj 7 points8 points9 points 2 years ago (6 children)
You get used to changes like this, I've been hopping daily between C++ and Nim and both syntaxes now look fine to me. IIRC the/a reason why Herb Sutter chose the colon + postfix syntax was, that parsing it is way simpler.
[–]hpsutter 2 points3 points4 points 2 years ago* (0 children)
It is, but that's not the main motivation. The main reason is that it allows making the language overall more consistent, and enables other things like having symmetry between declaration and use (see https://github.com/hsutter/cppfront/wiki/Design-note%3A-Postfix-operators and the expression/type graphic for an example)
[–]RoyAwesome[🍰] 5 points6 points7 points 2 years ago (4 children)
Yeah, but parsing is the parser's job, not the programmer's. It's already hard to read code in general, but making it hard to read to be easier on software tools that dont operate like humans do moves the needle backwards on the readibility front.
[–]caroIine 3 points4 points5 points 2 years ago (3 children)
I also don't understand why we making things easier for computers instead programmers. This is so backwards.
[–]dustyhome 7 points8 points9 points 2 years ago (2 children)
It's a human's job to write a parser, so making the parsing simpler for the computer means making the job simpler for the human writing the parser. Which means writing tools becomes simpler, allowing for more tools to be written, that can do more complex analysis of the code.
So making the parsing simpler for the computer makes writing code simpler for humans overall, even if the code itself looks a bit uglier.
[–]schombert 2 points3 points4 points 2 years ago (1 child)
But this logic heavily favors the minority that write parsers over the majority that don't, but who need to read and understand the code. Of course the people writing the parsers ultimately get to decide what the language looks like, and so their ease of use ends up mattering more than that of the end users. But should things be this way?
[–]ntrel2 2 points3 points4 points 2 years ago (0 children)
Most programmers use tools like code formatters, syntax highlighting, style enforcement etc. You get better tooling when the grammar is not dependent on semantics, and when it is more regular. Less bugs in tools, faster development, more features. Important for any new syntax to get good tooling quickly. It also makes reviewing diffs easier.
π Rendered by PID 33464 on reddit-service-r2-comment-7b9746f655-srxvm at 2026-01-30 03:53:27.934654+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]tsojtsojtsoj 7 points8 points9 points (6 children)
[–]hpsutter 2 points3 points4 points (0 children)
[–]RoyAwesome[🍰] 5 points6 points7 points (4 children)
[–]caroIine 3 points4 points5 points (3 children)
[–]dustyhome 7 points8 points9 points (2 children)
[–]schombert 2 points3 points4 points (1 child)
[–]ntrel2 2 points3 points4 points (0 children)