> 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...
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...