3 ms·
Clojure's "killer feature" for me is the by-default persistent data structures. Are there any other functional languages out there with similar features? Lisp
by ubercow 9y ago
Clojure's "killer feature" for me is the by-default persistent data structures.
Are there any other functional languages out there with similar features? Lisp or otherwise.
- jbeja 9y agoAny mainstream functional language at this point. The data structures are not closed.
- runT1ME 9y agoScala has a collections library that heavily emphasizes immutable/persistent data sructures. You aren't forces to use them but it is idiomatic Scala to be "pure"/non mutating.
- lilactown 9y agoErlang/Elixir also is immutable & persistent by default.
- retrogradeorbit 9y agoIt is immutable and persistent, but not with the same performance characteristics. It lacks Bagwell's data structures that allow structural sharing. Take a 10 million item list in elixir and 'change' (return a new) the 5 millionth element. Time how long it takes. Do the same with clojure. Compare.
- ramchip 9y agoThat was true a few years ago, but not anymore: https://medium.com/@jlouis666/breaking-erlang-maps-1-31952b8729e6 https://medium.com/@jlouis666/breaking-erlang-maps-1-31952b8... (You would have to use a map though, the native lists are still plain old lists)
- deleted 9y ago[deleted]
- pmarreck 9y agoElixir has that, and you can't even drop into Java/JVM mode to violate it! ;) Haskell as well, I believe.
- mintplant 9y agoIn Haskell, data structures are immutable, persistent, and use structural sharing by default.