2 ms·
Nim const are compile-time constants, it's completely different from C++ const. I don't agree on immutability, just like you have shallow copy and deep copy, y
by mratsim 8y ago
Nim const are compile-time constants, it's completely different from C++ const.
I don't agree on immutability, just like you have shallow copy and deep copy, you have shallow immutability and deep immutability.
Also functional programming also distinguish pure (Haskell, Idris, ...) and impure functional programming (Ocaml, ...).
Allowing side-effect through reference doesn't mean that a language is hostile to functional programming. It just means that it does not enforce purity.