4 ms·
> If you are using containers, always, always, always use immutable containers from Google Guava unless you have an exceptionally good reason. I actually prefe
by wtetzner 4y ago
> If you are using containers, always, always, always use immutable containers from Google Guava unless you have an exceptionally good reason.
I actually prefer pcollections: https://github.com/hrldcpr/pcollections https://github.com/hrldcpr/pcollections
AtomicReference + immutable data types is a really nice way to program in Java, and is basically the way most Clojure programs are written.
- acchow 4y agoRead the example about “producers” - If I chain a whole bunch of producing together across many different Pcollections, I’m essentially forming a graph behind the scenes? Since no copying is happening Surely this would cause some strange performance outcomes with, say, a gradually built up immutable list.
- wtetzner 4y agoWhat do you mean by “strange performance outcomes”?