Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



I've updated the text to emphasize that. Thanks for pointing it out


Looks good!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: