You've highlighted a difference in rewrites I think is worth recognizing.
urllib -> requests & urllib3 is an example of a rewrite that does not preserve the original interface, which means it can fix more things but it has to convince people to adopt it for that to matter. More subtly, it means the old version still has to exist and still be maintained in some form. Best case, the old version wraps the new version, but even that can be a pain and in some cases can even limit the evolution of the new version.
Other kinds of rewrites preserve the old interface in all valid cases. They may be a lot more difficult because of their constraints, but the constraints also free you from having to make design decisions. When you're done, adoption shouldn't be a problem at all, and hopefully nobody ever has to maintain the old code in any way.
That's a great story of a much needed rewrite. Enjoy the well earned permanent retirement from dealing with that.
urllib -> requests & urllib3 is an example of a rewrite that does not preserve the original interface, which means it can fix more things but it has to convince people to adopt it for that to matter. More subtly, it means the old version still has to exist and still be maintained in some form. Best case, the old version wraps the new version, but even that can be a pain and in some cases can even limit the evolution of the new version.
Other kinds of rewrites preserve the old interface in all valid cases. They may be a lot more difficult because of their constraints, but the constraints also free you from having to make design decisions. When you're done, adoption shouldn't be a problem at all, and hopefully nobody ever has to maintain the old code in any way.
That's a great story of a much needed rewrite. Enjoy the well earned permanent retirement from dealing with that.
reply