I once had a very bizarre argument with a another coder (who by and large is way ahead of my skillset) who adamantly insisted that mutable was a sin comparable to goto. I tried repeatedly to explain that to me, code that can’t buffer up heavy duty calculations until they are actually needed is pretty damn evil too, but we’d pretty much hit stalemate from the moment the argument started.
I still can’t understand why some people get so freaked out by mutable. Sure it allows idiots to do utterly busted stuff, but so do pointers, recursion, and all manner of other things that are considered essential to the c++ language.
Oh, he was pretty anti multiple inheritance too. :)[/quote]
The book, “C++ Common Knowledge” by Stephen C. Dewhurst has an excellent article on this. Great book. I thought mutable was evil too until I read this. Felt quite chuffed when I used one in a viable situation, after I had my “const epiphany”. All C++ coders get that right?