Re: C++ implementation for C API ---- converting legacy C code to C++
- From: "H. S. Lahman" <h.lahman@xxxxxxxxxxx>
- Date: Thu, 25 Aug 2005 17:45:19 GMT
Responding to Feathers...
I wish you wouldn't copy me privately when posting publicly. When I saw the private message I assumed you deliberately took it offline. Now I have to cut & paste my private response to that message for the public one.
That's fine if you wrote the code or feel that you understand it well, but the world is littered with half-done replacement projects that people where people thought that the understood the original system. It can be done, but often a better way of going is to introduce enough OO in the code base to get tests in place then you can refactor or replace pieces as necessary.
I regard understanding the requirements as pretty much the same thing as needing to ensure the software works correctly. IOW, that's a given or the project shouldn't be undertaken in the first place. B-)
In addition, refactoring will not help if the legacy code has already suffered architectural drift. If one throws some classes at the C code and then starts refactoring all one gets is a C program with strong typing. That's because the C code was /designed/ using procedural paradigms and that structure will still be there after one cosmetically collects procedures into classes. One needs to rewrite to apply OOA/D to get rid of the procedural baggage. So even if one is doing XP, one needs to start with the System Metaphor, Architectural Spike, and CRCs to make sure one has a proper abstraction framework for the OOP refactoring.
************* There is nothing wrong with me that could not be cured by a capful of Drano.
H. S. Lahman hsl@xxxxxxxxxxxxxxxxx Pathfinder Solutions -- Put MDA to Work http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman (888)OOA-PATH
.
- Follow-Ups:
- Re: C++ implementation for C API ---- converting legacy C code to C++
- From: Michael Feathers
- Re: C++ implementation for C API ---- converting legacy C code to C++
- References:
- Re: C++ implementation for C API ---- converting legacy C code to C++
- From: H. S. Lahman
- Re: C++ implementation for C API ---- converting legacy C code to C++
- From: Michael Feathers
- Re: C++ implementation for C API ---- converting legacy C code to C++
- Prev by Date: Re: Confusion With Inheritance
- Next by Date: Re: Confusion With Inheritance
- Previous by thread: Re: C++ implementation for C API ---- converting legacy C code to C++
- Next by thread: Re: C++ implementation for C API ---- converting legacy C code to C++
- Index(es):