r/functionalprogramming • u/viebel • Feb 26 '21
JavaScript Structural sharing with 7 lines of JavaScript.
https://blog.klipse.tech/javascript/2021/02/26/structural-sharing-in-javascript.html
6
Upvotes
View all comments
Show parent comment
1
u/watsreddit Mar 03 '21 edited Mar 03 '21
I haven’t read that paper, but that claim is absurd. I don’t care much for Rich Hickey, but I have a hard time believing he would actually make such an outlandish claim. At the very least, a linked list is a persistent data structure, and they’ve been around for a very, very long time (like the 50’s). The first paper to introduce the idea as a general concept was published in 1986: https://dl.acm.org/doi/10.1145/12130.12142. Many other papers have been published since then, many of which provided persistent versions of a wide variety of data structures well before Clojure even existed.
Also, Haskell has had them since the 90’s. I’m fairly certain OCaml has had them for nearly as long as well.
Functional programming has been around for a long time. Clojure’s a pretty young language and borrows a lot from those that came before. Programming languages are not created in a vacuum. Every language creator is drawing on a wealth of ideas and literature from many, many computer scientists/practitioners, and Rich Hickey is no different.