[Python-Dev] AlternativeImplementation forPEP292:SimpleString Substitutions

Stephen J. Turnbull stephen at xemacs.org
Sat Sep 11 09:35:08 CEST 2004

>>>>> "Gareth" == Gareth McCaughan <gmccaughan at synaptics-uk.com> writes:

    Gareth> On Friday 2004-09-10 06:38, Stephen J. Turnbull wrote:

    >> But [efficiency], as such, is important only to efficiency
    >> fanatics.

    Gareth> No, it's important to ... well, people to whom efficiency
    Gareth> matters. There's no need for them to be fanatics.

If it matters just because they care, they're fanatics.  If it matters
because they get some other benefit (response time less than the
threshold of hotice, twice as many searches per unit time, half as
many boxes to serve a given load), they're not.  </F>'s talk of many
ways to do things "and Python should account for most of them" strikes
me as fanaticism by that definition; the vast majority of developers
will never deal with the special cases, or write apps that anticipate
dealing with huge ASCII strings.  Those costs should be borne by the
developers who do, and their clients.

I apologize for shoehorning that into my reply to you.

    >> The question is, how often are people going to notice that when
    >> they have pure ASCII they get a 100% speedup [...]?

    Gareth> Why is that the question, rather than "how often are
    Gareth> people going to benefit from getting a 100% speedup when
    Gareth> they have pure ASCII"?

Because "benefit" is very subjective for _one_ person, and I don't
want to even think about putting coefficients on your benefit versus
mine.  If the benefit is large enough, a single person will be willing
to do the extra work.  The question is, should all Python users and
developers bear some burden to make it easier for that person to do
what he needs to do?

I think "notice" is something you can get consensus on.  If a lot of
people are _noticing_ the difference, I think that's a reasonable rule
of thumb for when we might want to put "it", or facilities for making
individual efforts to deal with "it" simpler, into "standard Python"
at some level.  If only a few people are noticing, let them become
expert at dealing with it.

    Gareth> Or even "how often are people going to try out Python on
    Gareth> an application that uses pure-ASCII strings, and decide to
    Gareth> use some other language that seems to do the job much
    Gareth> faster"?

See?  You're now using a "notice" standard, too.  I don't think that's
an accident.

    >> I just don't see the former being worth the extra effort, while
    >> the latter makes the "this or that" choice clear.  If a single
    >> representation is enough, it had better be Unicode-based, and
    >> the others can be supported in libraries (which turn binary
    >> blobs into non-standard text objects with appropriate methods)
    >> as the need arises.

    Gareth> No question that if a single representation is enough then
    Gareth> it had better be Unicode.

Not for you, not for me, not for </F>, I'm pretty sure.  The point
here is that there is a reasonable way to support the others, too, but
their users will have to make more effort than if it were a goal to
support them in the "standard language and libraries."  I think that's
the way to go, and </F> thinks the opposite AFAICT.

Institute of Policy and Planning Sciences     http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba           

More information about the Python-Dev mailing list