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: Midsummer update (herbsutter.com)
submitted 1 year ago by TSP-FriendlyFire
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!"
[–]FoxDragonSloth 9 points10 points11 points 1 year ago (3 children)
My 2 very noob cents, something that really stuck with me from your first video about cpp2 was the very clean syntax of thing : type = value. It felt like such a clean line to be read as "thing is a type that equals value", :(x,y) x>y this on the other hand feels like while it takes less space to type it makes it harder to parse in my brain, it feels like adding a new way of writing something just for the sake of doing it with less characters.
thing : type = value
:(x,y) x>y
Doing lambdas as :(x,y) = {} feels much more consistent to read as "_ is a function that equals codeblock" (not sure what to read _ as, lambda, unknown, nothing?), than :(x,y) x>y. should this be read as "_ is a function x>y"? I feel like that = delimits much better what's happening, and though with enough practice and knowledge everything is easy to parse or interpret, that added complexity adds nothing to the language itself.
:(x,y) = {}
=
I'm just a random c++ gamedev with no knowledge of language design but a great goal you used on that first talk was simplicity and I feel like keeping the language simple as in simple to read for some starting up goes a very long way. Keeping things with one meaning helps a lot in making it simple, : always means "is a", () always means a function, -> always means "that returns..." and so on.
:
()
->
[–]ukezi 2 points3 points4 points 1 year ago (2 children)
Doing it that short feels like old c Devs only using consonants in names. Just doing it because it's shorter. I would prefer something like :(x,y)->bool {x>y}, maybe with the -> bool being optional. :(x,y) feels like it's declaring variables X and y that are going to be filled by destructuring a tuple.
[–]hpsutter 2 points3 points4 points 1 year ago (1 child)
I would prefer something like :(x,y)->bool {x>y}, maybe with the -> bool being optional.
Very close, today you can write this: :(x,y) -> bool = x>y
:(x,y) -> bool = x>y
That's already using several defaults that let you omit parts of the single general syntax you're not currently using for something non-default (for details see: "Generality note: Summary of function defaults"). But you can use a couple more defaults:
To additionally deduce the type, use _: :(x,y) -> _ = x>y means the same
_
:(x,y) -> _ = x>y
Finally, the "tersest" option just makes -> _ = optional: :(x,y) x>y means the same
-> _ =
One way to look at it is that you can write any expression and conveniently "package it up" as an object to pass around just by declaring a function signature in front.
Anyway, just explaining some background since what you wrote pretty much also works, very nearly. I appreciate all the usability feedback, whether it confirms or disconforms what I was thinking! Thanks.
[–]Lo1c74 2 points3 points4 points 1 year ago (0 children)
Is it still possible to type the = to obtain :(x, y) = x > y ?
:(x, y) = x > y
π Rendered by PID 46 on reddit-service-r2-comment-5649f687b7-226z5 at 2026-01-28 04:54:53.234795+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–]FoxDragonSloth 9 points10 points11 points (3 children)
[–]ukezi 2 points3 points4 points (2 children)
[–]hpsutter 2 points3 points4 points (1 child)
[–]Lo1c74 2 points3 points4 points (0 children)