Re:Oracle Tunes Java's Internal String Representation
by twic on Wednesday December 25, 2013 @07:23PM
(#6964807)
Okay, so of course they considered this, and decided it was a bad move:
http://www.reddit.com/r/programming/comments/1qw73v/til_orac...
This would be a surprising bit of behaviour, which means it's probably a bad idea. However, it wouldn't break any current code, because it preserves current behaviour, and hopefully wouldn't break future code, because people could learn about the quirk. Also, i think subSequence tends to be used to create temporary objects as computational intermediaries, rather than new long-lived objects which escape to the heap, so it shouldn't lead to excessive packratting in the way the old-style substring did.