4 ms·
It's also how you end up with cargo cult optimizations for things that may have been solved ages ago in the VM. I've met Java devs who still insist on using Str
by deleuze 6y ago
It's also how you end up with cargo cult optimizations for things that may have been solved ages ago in the VM. I've met Java devs who still insist on using StringBuilder for everything without empirical evidence.
- darepublic 6y agoI was indoctrinated with that in school. What, it is not true anymore?
- deleuze 6y agoYes! Much has changed. Here's a good summary: https://stackoverflow.com/questions/46512888/how-is-string-concatenation-implemented-in-java-9 https://stackoverflow.com/questions/46512888/how-is-string-c... The change in question is JEP 280.
- michielderhaeg 6y agoDon't quote me on this, but I think most String operations are compiled to StringBuilder operations automatically.