3 ms·
Please just read the code. I think it's rather amazing that you claim that Eclipse's immutable collections are memory efficient when they either a) completely
by airless_bar 10y ago
Please just read the code.
I think it's rather amazing that you claim that Eclipse's immutable collections are memory efficient when they either
a) completely lack support for many important operations like appending and prepending, or
b) implement operations like drop and take by not reusing anything, but copying everything over.
None of the code written by people using immutable data structures would work with this API. It feels like it's an immutable collection API designed by people who have never used immutability before. It has this weird 0th-generation immutable == read-only style to it.
Yeah, if you use those collections as if they were arrays, then they might be memory efficient, I give you that.
But then why not use arrays in the first place?
And then the next question comes up ... why even bother with Java? Use Rust, and do away with the defensive copying altogether. Coding like this is just using the wrong technology for the job.