[Python-Dev] Opinions on const-correctness?
Greg Ewing
greg@cosc.canterbury.ac.nz
Wed, 13 Mar 2002 13:41:21 +1300 (NZDT)
Andrew Koenig <ark@research.att.com>:
> I think Guido is correct to the extent that it is a real nuisance
> to retrofit const to a substantial program that was written without
> using it in the first place.
>
> I think Dave is correct to the extent that adding const to the
> parameters of a collection of library functions rarely causes
> trouble for users of that library.
A possible compromise would be to provide an alternative
version of Python.h which has the const declarations, for
use by extensions that want it. Extensions that didn't
use it wouldn't be affected, and neither would Python
itself, which would continue to use the old headers.
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+