How to waste computer memory?

Steven D'Aprano steve at pearwood.info
Fri Mar 18 07:58:58 EDT 2016


On Fri, 18 Mar 2016 10:46 pm, Steven D'Aprano wrote:

> I think it is typical of JMF that his idea of a language where Unicode
> "just works" is one where it *does work at all* (at least not as strings).

Er, does NOT work at all.

> Python 1.5 strings supported Unicode just as well as Go's string class.

Since I'm replying to myself, I guess I can take the opportunity to expand
on this. Go's concept of strings is, more or less, byte strings:

https://blog.golang.org/strings

They are handled as an array of bytes and indexing produces bytes. That's
exactly the same functionality as Python strings provided in version 1.5.
In fairness, Go does provide a second type, "runes", which is equivalent to
Python 2.7 unicode using a wide build (i.e. equivalent to UTF-32).




-- 
Steven




More information about the Python-list mailing list