|
|
|
|
|
by toldyouso2022
1057 days ago
|
|
One easy advantage is predictability due to thing not changing. Let's say there is an array (maybe I should have written list).
Since that array cannot change in fp, when you do operations with that array, you don't have to worry it changed. Then the language itself will also know this and manage memory accordingly. So if you have array with 1,2,3 and an array with 3,4,5 if you unite the arrays memory can just reference the two array as if they were one instead of creating a new one, because for sure they will never change. Imagine this on very big arrays |
|
Someone was able speed up React's virtual DOM using Clojure data structures.