program surgery vs. type safety

Aaron Watters aaron at reportlab.com
Thu Nov 13 16:16:00 EST 2003


tweedgeezer at hotmail.com (Jeremy Fincher) wrote in message news:<698f09f8.0311121539.e699627 at posting.google.com>...
> aaron at reportlab.com (Aaron Watters) wrote in message news:<9a6d7d9d.0311120822.553cd347 at posting.google.com>...> 
> I am curious, however -- what are these "type unsafe" stages you have
> to go through to refactor your program?  I've refactored my personal
> project several times and haven't yet gone through what I'd consider a
> type-unsafe stage, where I'm *fundamentally* required to use
> operations that aren't type-safe.

It's a bit hard to describe, but it works something like this:
there is a problem in one particular path through the code which
requires a fundamental data structure/interface change... 
to fix, try several approaches
(which each invalidate bighunks of code not on the test path)
and once you find the one that works best, THEN retrofit the
remaining code.

Now if I wrote zillions of tiny modules with zillions of tiny
functions, methods and classes in them this procedure might be type safe.
But I don't do that.
    -- Aaron Watters
===
If I haven't seen as far as others it is because
giants have been standing on my shoulders.   -- Gerald Sussman




More information about the Python-list mailing list