19 Dec
2008
19 Dec
'08
2:02 a.m.
On Thu, Dec 18, 2008 at 4:15 PM, Henning Thielemann
In C/C++ referential transparent functions code can be declared by appending a 'const' to the prototype, right?
For one thing, some fields in a const C++ object can be explicitly set mutable. mutable is sometimes used in C++ a similar way to unsafePerformIO in Haskell. You have something that uses mutability in its internals but that mutability shouldn't be observable to the caller. In both cases you have no means of actually ensuring that the mutability is actually unobservable. -- Dan