Cult-like behaviour [was Re: Kindness]

Chris Angelico rosuav at gmail.com
Sun Jul 15 19:13:24 EDT 2018


On Mon, Jul 16, 2018 at 9:08 AM, Jim Lee <jlee54 at gmail.com> wrote:
>
>
> On 07/15/18 14:50, Marko Rauhamaa wrote:
>>
>> Jim Lee <jlee54 at gmail.com>:
>>>
>>> Yes, and for *that*, language matters;  but, for a vast array of
>>> programming tasks that *don't* involve global communications, it's an
>>> added level of complexity with zero benefit.  It would be *nice* to be
>>> able to turn support on or off, depending on the requirements of the
>>> individual program or, better yet, be able to simply ignore the
>>> feature(s).
>>
>> Can you illustrate your point with some lines of Python code?
>>
>>
>> Marko
>
>
> Python3 is intrinsically tied to Unicode for string handling. Therefore, the
> Python programmer is forced to deal with it (in all but trivial cases),
> rather than given a choice.  So I don't understand how I can illustrate my
> point with Python code since Python won't let me deal with strings without
> also dealing with Unicode.

When a Python program works with integers, the programmer isn't given
the choice of being restricted to machine words, but is forced to have
the freedom to use any integer at all (bignums). There are very rare
situations where you actually want integer wrap-around, and those have
to be implemented using modulo arithmetic or similar. This is
generally considered to be the correct trade-off, since those
situations are usually fairly low-level anyway (implementing an
algorithm originally spec'd up in C).

Provide a single example of something where the freedom to use all of
Unicode in text handling is actually a bad thing.

ChrisA


More information about the Python-list mailing list