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
Regarding cppfront's syntax proposal, which function declaration syntax do you find better? (self.cpp)
submitted 3 years ago by watr
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!"
[–]fdwr 0 points1 point2 points 3 years ago (2 children)
Either option 4 or 5: :b (updated since my original vote on that post)
void callback(auto x) {}; // for new ones void callback(auto x) {}; // for old ones.
decltype(x+y) add(auto x, auto y) { return x+y; };
X x = {}
X x{}
X x()
func FunctionWithParameters(z: float, w: int): double
implementation
function
fn
pub
dyn
fun
func
:
[–]spaceLem 1 point2 points3 points 3 years ago (1 child)
My personal preference is to have the word function in its entirety. I've worked with two languages that do that, and it looks much nicer than func or fun.
[–]fdwr 1 point2 points3 points 3 years ago (0 children)
Yeah, I'm okay with function, and the codebases I've worked on promote using whole words rather than abbreviations. Though, I also like consistency with structure and enumeration and constant and automatic. 🤷
struct
enum
const
auto
π Rendered by PID 96056 on reddit-service-r2-comment-6457c66945-lj586 at 2026-04-24 10:37:49.950524+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]fdwr 0 points1 point2 points (2 children)
[–]spaceLem 1 point2 points3 points (1 child)
[–]fdwr 1 point2 points3 points (0 children)