3 ms·
> Tbh the collections being mutable isnt really an issue since it gets the job done and reasoning about these things isnt that hard. Have you worked in languag
by Quekid5 1y ago
> Tbh the collections being mutable isnt really an issue since it gets the job done and reasoning about these things isnt that hard.
Have you worked in language with immutable collections by default? It's night and day -- no more defensive copies, no more weird ImmutableList wrappers (Guava) which will (interface-wise) say they're mutable but will throw at runtime, no worrying about multithreading, cheap subsequences, etc. etc.
The difference is so stark that I would literally choose a worse[0] language(!) over a better one if it had immutable collections by default.
EDIT: Since you mentioned Java in a sibling comment -- give Scala a try and try working with the collections there.
[0] Within reason, of course :)