4 ms·
Also by the lack of persistent data structures with structural sharing. That forces you to take an expensive copy whenever you want a modified version of some d
by AlexCoventry 6y ago
Also by the lack of persistent data structures with structural sharing. That forces you to take an expensive copy whenever you want a modified version of some data, or bash it in place.
- Iwan-Zotow 6y agoIsn't it a true functional way?
- iimblack 6y agoI could definitely be wrong but I think most functional data structures aren’t fully copied. Instead, they’ll utilize something like a pointer to the data that stayed the same so only the part that changes is “copied”.
- alentist 6y agoThere are smarter ways to deal with data structures in the functional setting than copying the entire structure over and over again. See https://en.wikipedia.org/wiki/Purely_functional_data_structure https://en.wikipedia.org/wiki/Purely_functional_data_structu... and Okasaki’s book Purely Functional Data Structures.
- heavyset_go 6y agoThere's Pyrsistent[1], which provides persistent data structures. [1] https://github.com/tobgu/pyrsistent https://github.com/tobgu/pyrsistent