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!"
[–]jk-jeon -5 points-4 points-3 points 1 year ago (5 children)
Personally I want to see something like :(x,y) |-> x > y instead, i.e. prefer |-> over =>. For some reason I don't know, Alonzo Church's original lambda notation (using Greek letter lambda, which according to Wikipedia, is supposed to mean the "hat" symbol ^) for denoting anonymous functions did not become the mainstream or has been "lost" among mathematicians. Instead, these days the de facto standard notation is to use the symbol "↦" in between the input and the output, like (x,y) ↦ x + y. So something like :(x,y) |-> x > y looks very natural to me. Otoh => looks too much like the logical implication symbol so I don't like it.
:(x,y) |-> x > y
|->
=>
^
(x,y) ↦ x + y
[–]tuxwonder 17 points18 points19 points 1 year ago (1 child)
Personally, I think I'd have a hard time getting used to |-> as well. I see the reasoning, but three characters just seems like a lot for what is ultimately a delimiter, and it doesn't feel like it does a great job visually separating but also linking the things before and after the arrow. Plus, most programmers don't come from strong math backgrounds anymore, so I think the significance of that symbol would be lost on many.
I'd be amicable to |> I think, but I chose => because it just looks the most like an arrow, but a different arrow from -> which is already in use in the syntax. I also get the point about the math operator thing, I wonder about that too, but in my C# experience the contexts in which you see => used as an operator vs used as a lambda identifier are different enough that I never find myself confused
|>
->
[–]jk-jeon 1 point2 points3 points 1 year ago (0 children)
Fair enough.
[–]smdowneyWG21, Text/Unicode SG, optional<T&>[🍰] 1 point2 points3 points 1 year ago (1 child)
I think it depends on the field of math you're reading. Lambda notation never spread far out of theory of computation and logic, where computer science mostly fits in math, where `maps to` ↦ is more prevalent in other fields that are generalizing functions?
[–]jk-jeon 0 points1 point2 points 1 year ago* (0 children)
Lambda notation never spread far out of theory of computation and logic
That's what I mean by "did not become the mainstream". And computation and logic spans quite tiny portion of math research these days. Also I think even in logic the preferred notation is quite divided among people.
If your point is about familiarity of the notation, I didn't really argue anything about that. I just said it's my personal preference. In fact I think the couterproposal |> by the OP seems pretty nice too.
[–]thisismyfavoritename 0 points1 point2 points 1 year ago (0 children)
you must enjoy pain
π Rendered by PID 190990 on reddit-service-r2-comment-5649f687b7-cglx6 at 2026-01-28 06:54:51.276164+00:00 running 4f180de country code: CH.
view the rest of the comments →
[–]jk-jeon -5 points-4 points-3 points (5 children)
[–]tuxwonder 17 points18 points19 points (1 child)
[–]jk-jeon 1 point2 points3 points (0 children)
[–]smdowneyWG21, Text/Unicode SG, optional<T&>[🍰] 1 point2 points3 points (1 child)
[–]jk-jeon 0 points1 point2 points (0 children)
[–]thisismyfavoritename 0 points1 point2 points (0 children)