3 ms·
C++ const-correctness is weaker than immutability in, say Haskell or Scala.
by pkolaczk 13y ago
C++ const-correctness is weaker than immutability in, say Haskell or Scala.
- fhd2 13y agoCan't say anything about Haskell, but what Scala has is less flexible then const correctness in C++ IIRC. You can't have an immutable reference to a otherwise mutable object and then call non-mutating functions on it. It's either fully immutable or fully mutable. CMIIW by all means.