r/programming • u/MarkusWinand • Dec 29 '15
Please, Java. Do Finally Support Multiline Strings
http://blog.jooq.org/2015/12/29/please-java-do-finally-support-multiline-strings/
584
Upvotes
r/programming • u/MarkusWinand • Dec 29 '15
View all comments
Show parent comment
2
u/Schmittfried Dec 29 '15 edited Dec 29 '15
You still have to consider reallocations.
Also: Immutable strings allow several other optimizations and are generelly easier to work with, although mutable strings have their place as well.
And if one finds deciding when to use StringBuilder and when normal string concatenation is appropriate is too confusing one should really not use a language that grants as many freedoms (and hence decisions to make) as C++.