A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024666.html below:

[Python-Dev] deprecating string module?

[Python-Dev] deprecating string module?David Abrahams David Abrahams" <david.abrahams@rcn.com
Thu, 30 May 2002 09:01:20 -0400
From: "Guido van Rossum" <guido@python.org>


> > > These "use cases"
> > > don't convince me that there's a legitimate use case for
> > > string.letters etc. that the methods don't cover.
> >
> > This is funny. In the C++ community there's a nearly unanimous
> > consensus that way too much of the functionality of the standard
> > strings is expressed as member functions.
>
> Interesting.  Python used to have the same attitude, hence the string
> module -- but the existence of multiple string types made methods more
> attractive.
>
> What's the alternative proposed for C++?

Free functions at namespace scope. The analogy would be module-level
functions in Python. C++ also has multiple string types, but the
availability of overloading makes this approach practical (is it time for
Python multimethods yet?)

If I were to make arguments against string member functions in Python I'd
be talking about the degree of coupling between algorithms and data
structures, how it interferes with genericity, and the difficulty that
users will have in making "string-like" types...

but-i-would-never-make-such-silly-arguments-ly y'rs,
dave





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4