MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/xgcbt9/cppfront_herb_sutters_personal_experimental_c/ioxyrl3/?context=3
r/cpp • u/mttd • Sep 17 '22
360 comments sorted by
View all comments
Show parent comments
0
Why add auto if you're already specifying the type afterwards?
auto
And my issue with the original were the added : and =; they were redundant.The = could be used in lambdas only, it would make it pretty clear.
:
=
0 u/[deleted] Sep 17 '22 [deleted] 2 u/[deleted] Sep 18 '22 edited Sep 18 '22 Afaik, the arrow at the end already eliminates confusion between declaration and call (unless I'm forgetting other uses for it).I think the = should be used only with lambdas, that would look pretty good. 1 u/AIlchinger Sep 18 '22 That's right. However, the parser works left to right and the easier it can distinguish between call or declaration, the more efficient it can (potentially) be. → More replies (3)
[deleted]
2 u/[deleted] Sep 18 '22 edited Sep 18 '22 Afaik, the arrow at the end already eliminates confusion between declaration and call (unless I'm forgetting other uses for it).I think the = should be used only with lambdas, that would look pretty good. 1 u/AIlchinger Sep 18 '22 That's right. However, the parser works left to right and the easier it can distinguish between call or declaration, the more efficient it can (potentially) be. → More replies (3)
2
Afaik, the arrow at the end already eliminates confusion between declaration and call (unless I'm forgetting other uses for it).
I think the = should be used only with lambdas, that would look pretty good.
1 u/AIlchinger Sep 18 '22 That's right. However, the parser works left to right and the easier it can distinguish between call or declaration, the more efficient it can (potentially) be. → More replies (3)
1
That's right. However, the parser works left to right and the easier it can distinguish between call or declaration, the more efficient it can (potentially) be.
→ More replies (3)
0
u/[deleted] Sep 17 '22
Why add
autoif you're already specifying the type afterwards?And my issue with the original were the added
:and=; they were redundant.The
=could be used in lambdas only, it would make it pretty clear.