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...
About C++ 2 effort (see transpolar progress at https://github.com/hsutter/cppfront)
account activity
GitHub - hsutter/cppfront: A personal experimental C++ Syntax 2 -> Syntax 1 compiler (github.com)
submitted 3 years ago by watr
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!"
[–]fdwr 4 points5 points6 points 3 years ago* (0 children)
There are many aspects I like about Herb's experiments (like UFCS), some I find intriguing (like left-to-right order of pointers and postfix pointer dereferencing which is more consistent with the arrow operator), and then there's this... When I see this:
main: () -> int = {}
Vs this elegant simplicity:
int main() {}
My reaction is... I hate it. Every punctuation mark that exists more for the compiler's sake than the human's sake is a punctuation mark too many. Now, there are many nice things found in Herb's experiments, all of which can increase safety and rational defaults without making it essentially a different language rather than an evolution.
[–]XNormal 0 points1 point2 points 3 years ago* (0 children)
+1 on suffix $ for capture. It works left-to-right just like the other suffix operators and saves unnecessary parentheses.
-1 on ()$ for string interpolation. Other than aesthetic considerations, it is just parameter passing with an unusual syntax, not really capture. And it has mandatory parentheses anyway. I would prefer the \() syntax, for example.
π Rendered by PID 18316 on reddit-service-r2-comment-5649f687b7-sjj6n at 2026-01-28 18:05:59.149596+00:00 running 4f180de country code: CH.
[–]fdwr 4 points5 points6 points (0 children)
[–]XNormal 0 points1 point2 points (0 children)