Cult-like behaviour [was Re: Kindness]
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Sun Jul 15 20:16:57 EDT 2018
On Sun, 15 Jul 2018 13:09:59 -0700, Jim Lee wrote:
> On 07/15/18 12:37, MRAB wrote:
>> To me, Unicode and UTF-8 aren't things to be reserved for I18N. I use
>> them as a matter of course because I find it a lot easier to stick with
>> just one encoding, one that will work with _any_ text I have.
>
> Which is exactly the same rationale for using any other single encoding
> (including ASCII).
Which encoding should I choose?
Having chosen one today, which encoding should I choose tomorrow?
> If the text you deal with is not multi-lingual, why
> complicate matters by trying to support a plethora of encodings which
> will never be used (and the attendant opportunity for more bugs)?
Who mentioned a plethora of encodings? With the boundaries of your
application, using Python 3 text strings means never needing to even
consider encodings. The only time you should care about them is when your
data crosses the boundary between your application and the rest of the
world (e.g. writing to files), and in that case, we should standardise on
UTF-8 (unless there's a really good reason not to).
Honestly Jim, your response sounds to me the equivalent of:
"... and that's why structured programming will never catch
on, and why unstructured programming with GOTO is better,
faster, more reliable, and can do everything that the
programmer needs."
Aside from occasional legacy software reasons, I believe that one would
have to ignore the last 30+ years of "code page hell" to even consider
using anything but Unicode in modern application software.
> Note that I'm *not* saying Unicode is *bad*, just that it's an
> unnecessary complication for a great deal of programming tasks. For a
> great deal more, it's absolutely necessary. That why I said a "smart"
> language would make it easy to turn on and off.
You actually said that I18N features should be able to be turned on and
off. Unicode and I18N are unrelated.
--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson
More information about the Python-list
mailing list