4 ms·
> The most common use of mutable data, and I would argue that the only reasonable use of mutable data is for caching. This was confusing to read in the context
by foobarbazqux 13y ago
> The most common use of mutable data, and I would argue that the only reasonable use of mutable data is for caching.
This was confusing to read in the context of C++, because I typically associate that view with functional programming. Don't the majority of C++ classes require mutable data to work properly, even the ones in the STL? How do you write std::vector<> without mutable data?
Ok, so I looked a bit more, and it turns out there's a "mutable" keyword...
- cdmh 13y agoI've updated the text to emphasize that. Thanks for pointing it out
- foobarbazqux 13y agoLooks good!