4 ms·
These slides are from 2011, so some things have changed for the better in the interim. For example, Python now uses a flexible internal string representation th
by re 11y ago
These slides are from 2011, so some things have changed for the better in the interim. For example, Python now uses a flexible internal string representation that ensures that characters in a string are always whole code points, addressing the "inherent brokenness" called out in the slides: https://www.python.org/dev/peps/pep-0393/ https://www.python.org/dev/peps/pep-0393/
- Joeri 11y agoPHP now also has intl, which provides access to the gamut of functionality of libicu, so the php part of the deck needs a near-total rewrite.
- Avernar 11y agoFor what reason other than perhaps font rendering code do you need to index code points in a string? Everything you think you need code points for (character counting, truncation, etc) you actually need grapheme clusters. I wish Python went with UTF-8 instead of their multi width internal representation.
- Veedrac 11y agoThe problem IMHO is more not regressing on lots of already-written code which assumes O(1) indexing, and less a problem of principle.
- Avernar 11y agoMost code works perfectly fine indexing bytes in a UTF-8 string. Anything that looks for stuff in the ASCII range such as parsers would not need to be changed. Python 3 already required all code to be looked over because of the string literal change so it wouldn't be much different.