Flexible string representation, unicode, typography, ...

wxjmfauth at gmail.com wxjmfauth at gmail.com
Thu Aug 30 04:51:40 EDT 2012


Le jeudi 30 août 2012 08:55:01 UTC+2, Steven D'Aprano a écrit :


You are right.

But as soon as you introduce artificially a "latin-1"
bottleneck, all this machinery just become useless.

This flexible representation is working absurdly.
It optimizes the characters you are not using (in one
sense), it defaults to a non optimized form for the
characters you wish to use.

Pick up a random text and see the probability this
text match the most optimized case 1 char / 1 byte,
practically never.

If a user will use exclusively latin-1, she/he is  better
served by using a dedicated tool for "latin-1"

If a user will comfortably work with Unicode, she/he is
better served by using one of this tools which is using
properly one of the available Unicode schemes.

In a funny way, this is what Python was doing and it
performs better!

(Enough for today, *I* should spend my spare time
to toy with Go, this discussion gave *me* the wish
to dive in it again).

jmf



More information about the Python-list mailing list