Conversation

Replying to and
I'm optimistic JavaScript will get proper strings because WebAssembly is UTF-8 focused and they're making good decisions about how interoperability works with JavaScript despite it upsetting people invested in UCS2. Python switched from UCS2 to UCS4 which was a dumb decision...
1
2
Python took that same multiple string representation approach and browsers did the same for JavaScript. The strings are always fixed size units in Java / JavaScript / Python and they bloat themselves up to a larger unit if you add a single character from the range requiring it.
2
Replying to and
That's so obviously a bad approach and buys you nothing of value. It's so baffling to me that everyone bought into the idea that "indexing nth character" was a meaningful operation for strings and designed everything (badly) around that.
2
1
A lot of financial data still moves around in files with fixed-width records and subfields - say, stock ticker in columns 48-54, shares held in 55-68. So "extract ticker" needs char-at-index. You might be able to design a nicer format, but good luck getting big banks to use it.
1