2 ms·
Functional programming made me start using static classes for manipulation and instances for basic array containers and cleaners. Besides that my job has memory
by cdevs 9y ago
Functional programming made me start using static classes for manipulation and instances for basic array containers and cleaners. Besides that my job has memory heavy processing we try to keep low so to this date I can't see how immutable data wouldn't be more of a burden with lingering objects that are no longer used or need to be milled out. I did like how this article showed how returning a new variable represented the variables manipulation through name change.
- tyurok 9y agoI can speak for Erlang when coming to immutable data structures and the memory issue. Since erlang's processes are basicaly a recursive function, once the process dies or it calls itself (with tail-call optimization), unused structures dies out quickly. Also changing an immutable data structure does not make a whole copy but rather a "diff". And since processes are completely isolated, garbage collection is easy (and doesn't hang the whole runtime), so the memory argument has been solved for some time, not by the language, but by the runtime.