[Python-Dev] Raising objections

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Apr 20 13:09:33 CEST 2006


Guido van Rossum wrote:

> I'd rather recommend the approach that Joel suggests for truly large
> systems: refactoring smaller components while keeping the overall
> structure intact.

That's fine as long as the overall structure isn't the
very thing that's wrong and needs to be fixed.

Incremental refactoring is a hill-climbing approach,
and there's a well-known problem with hill-climbing
algorithms -- they have a tendency to get stuck on
the top of a small hill and fail to find the big hill.

I appreciate the loss-of-knowledge problem, I really
do. But maybe there is a way of dealing with it in
those cases where a change of structure really is
needed. Instead of throwing away the old code, go
over it line by line, sucking out the knowledge,
digesting it, and incorporating it into the relevant
places in the new structure. When you've finished,
and all that's left of the old code is a dry, empty
husk, then you can throw it away.

Perhaps this process could be called "pupation" --
breaking down the old structure and building something
new out of the parts, without wasting any of the
original material.

I'm not claiming that this necessarily has to be
done with distutils, but if it did need to be done,
I think it could be done, with sufficient effort.

I do think that the fact nobody but the now-absent
author seems to understand the internals of distutils
is a very serious problem, and something needs to be
done to make it easier to understand and maintain.

--
Greg


More information about the Python-Dev mailing list