Functional data structures in JavaScript with Mori
1–10 of 21 posts
Re: Functional data structures in JavaScript with Mori
#2JavaScript's `push` mutates data which you'd think you'd want to avoid if you're using a functional library like underscore/lo-dash.
`concat` makes sense to leave out when you consider that arrays already have a `concat` function. But if that's the reasoning, why did underscore/lo-dash include `size` and `max` and all those other things that already exist?
Re: Functional data structures in JavaScript with Mori
#3The performance of a transient vector is shockingly close to using a JavaScript array under Google V8 for adding new elements:
Re: Functional data structures in JavaScript with Mori
#4Re: Functional data structures in JavaScript with Mori
#5http://www.amazon.com/Purely-Functional-Structures-Chris-Oka...
Also check out this link for additional data structures worked on since then or simply not included in the book:
http://cstheory.stackexchange.com/questions/1539/whats-new-i...
Re: Functional data structures in JavaScript with Mori
#6Of course it is obligatory to mention the classic: Okasaki's "Purely Functional Datastructures" book. http://www.amazon.com/Purely-Functional-Structures-Chris-Oka... Also check out this link for additional data structures worked on since then or simply not included in the book: http://cstheory.stackexchange.com/questions/1539/whats-new-i...
Re: Functional data structures in JavaScript with Mori
#7Of course it is obligatory to mention the classic: Okasaki's "Purely Functional Datastructures" book. http://www.amazon.com/Purely-Functional-Structures-Chris-Oka... Also check out this link for additional data structures worked on since then or simply not included in the book: http://cstheory.stackexchange.com/questions/1539/whats-new-i...
Re: Functional data structures in JavaScript with Mori
#8I like that the article calls then "functional data structures". Every time I call them by their real name (persistent data structures), _at least_ one person will get confused and think I'm talking about serialization to disk.
Which would mean "functional" is a more general adjective than "persistent" since it includes both persistence and referential transparency.
Wikipedia[1] claims "There also exist persistent data structures which use destructible operations, making them impossible to implement efficiently in purely functional languages"
Re: Functional data structures in JavaScript with Mori
#9Recenlty I saw https://github.com/harukizaemon/hamster , similarly immutable, structure sharing, persistent data structures
It's becoming mainstream ...
Re: Functional data structures in JavaScript with Mori
#10I like that the article calls then "functional data structures". Every time I call them by their real name (persistent data structures), _at least_ one person will get confused and think I'm talking about serialization to disk.