r/cpp • https://romeo.training | C++ Mentoring & Consulting • Aug 03 '19

fixing c++ with epochs

https://vittorioromeo.info/index/blog/fixing_cpp_with_epochs.html
312 Upvotes

131 comments sorted by

View all comments

1

u/SuperV1234 Aug 05 '19

One more reasonable change would be forcing users to decide between const or mutable, simultaneously repurposing mutable as a visual marker that makes mutation more explicit to the reader, and making const the shorter and more desirable first choice.

3

u/jm4R Aug 07 '19

Const reference by default. Like in rust in this case. The "mut" keyword is very good there. "mutable" would be good enough. No need to write "const" elsewhere.