A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2002-March/021016.html below:

[Python-Dev] Opinions on const-correctness?

[Python-Dev] Opinions on const-correctness? [Python-Dev] Opinions on const-correctness?M.-A. Lemburg mal@lemburg.com
Tue, 12 Mar 2002 22:17:24 +0100
David Abrahams wrote:
> 
> > > The largest negative effect I can see is that it'll add some
> turbulence
> > > to the CVS log (many little changes).
> >
> > -1.
> >
> > I've never tried to enforce const-correctness before, but I've heard
> > enough horror stories about this.  The problem is that it breaks 3rd
> > party extensions left and right,
> 
> Only if you change the strings /returned/ by Python (or structure
> members) to const char*. Changing your parameters to const char* won't
> hurt anybody.

It doesn't hurt already compiled extensions, but it certainly 
breaks *all* yet to be compiled extensions ! 

Besides, it doesn't buy you much, since not all compilers use
the information for optimization (most I've seen only do careful 
checks of the implied read-only nature which can be very 
annoying).

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/



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