On Wednesday, 11 July 2012 at 12:39:03 UTC, Andrei Alexandrescu
wrote:
I gave evidence on a large, high quality C++ codebase that the
use of mutable (which is the solution of choice for
memoization, caching, and lazy computation) is extremely scarce.
What evidence do you have for your prediction?
Andrei
Qt codebase (large, high quality) has around 1500 'mutable'
keyword occurrences. The actual number of mutable declarations
must be lower, but they are quite common. 'Extremely scarce'
obviously does not apply there. Also, the ratio of occurrences of
mutable vs const keywords is not a good metric for estimating
logical const prevalence.