2 ms·
Functional languages only get away with immutability, because they give you better tools for combining parts of your program. For example, higher order functio
by eru 15y ago
Functional languages only get away with immutability, because they give you better tools for combining parts of your program. For example, higher order functions.
I believe that you can write a totally immutable C++ program. But it's probably much harder than writing the same program in Haskell. You could try writing an immutable program in D. D is somewhat similar to C++, but much saner.