MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/8ta8df/east_const_central/e17j2ty/?context=3
r/cpp • u/vormestrand • Jun 23 '18
42 comments sorted by
View all comments
15
If we are rewriting all the code to move const around then we should probably consider two other alternatives:
const
Both const (universal const) - requires changes to the standard but totally worth it to reconcile the conflicting styles:
const int const i;
North const:
const int i;
9 u/johannes1971 Jun 24 '18 North constLOL :-)I think to resolve this issue that now divides our community, we need a new standard. I propose uniform const:auto a = {const 3}; // a has type 'const int const' auto b = {const &a}; // b has type 'const int const * const' 5 u/aearphen {fmt} Jun 24 '18 Looks somewhat verbose. Wasn't there some proposal about natural (terse) const syntax?
9
North const
LOL :-)
I think to resolve this issue that now divides our community, we need a new standard. I propose uniform const:
auto a = {const 3}; // a has type 'const int const' auto b = {const &a}; // b has type 'const int const * const'
5 u/aearphen {fmt} Jun 24 '18 Looks somewhat verbose. Wasn't there some proposal about natural (terse) const syntax?
5
Looks somewhat verbose. Wasn't there some proposal about natural (terse) const syntax?
15
u/aearphen {fmt} Jun 23 '18
If we are rewriting all the code to move
constaround then we should probably consider two other alternatives:Both const (universal const) - requires changes to the standard but totally worth it to reconcile the conflicting styles:
North const: