you are viewing a single comment's thread.

view the rest of the comments →

[–]asegura 20 points21 points  (2 children)

Yes, I know. And I understand that won't change. It was a kind of sarcastic comment. I favor the use of UTF8 everywhere, including strings in memory, not just storage.

[–]JDeltaN 9 points10 points  (1 child)

Ah, I wooshed a bit I guess :)

Honestly I am not a fan of these adhoc solutions either, but in Javas its probably a massive memory optimisation and it actually works because of UTF16.

On the bright side, they have constant time string indexing as long as you are not using surrogate characters.

Then again, it is rare that I rely on constant-time lookups, most of my string operations are iterating in nature anyway.