Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!hal.com!paul From: paul@hal.com (Paul Sander) Newsgroups: comp.software-eng Subject: Re: Reserve Demobilization System Built Around Re Message-ID: <1991Jun15.002954.20136@hal.com> Date: 15 Jun 91 00:29:54 GMT References: <1991Jun11.062703.15671@netcom.COM> <1991Jun14.152529.1@east.pima.edu> Sender: news@hal.com Organization: HaL Computer Systems Lines: 49 In article <1991Jun14.152529.1@east.pima.edu> rharwood@east.pima.edu writes: > >OK... maybe we can LIGHTLY (read as: "without flame") discuss and subsequently >define what reuse really IS (or ought to be!). Sounds like an old debate firing up again... >My Personal Opinion: Calling a DBMS or GUI or math routine is NOT reuse. Why? Suppose you write a generic quicksort routine, and include it in a new product. Since you just wrote this, obviously it was not reused. But later you use it in another product. Is this reuse? Certainly. Then you change jobs and add that routine to the runtime library of a new operating system so others don't need to rewrite it. When those other customers call your quicksort routine, is this reuse? At this point, your quicksort routine has fallen into the same category of a DBMS or GUI or math routine. >Libraries of complex mathematical subroutines have been available to FORTRAN >programmers since ENIAC, I suppose. Perhaps "reuse" is truly short-hand for >"source code reuse"? The term has mostly come to represent the ability to >incorporate software written for or funded by "some other" project with little >or no modification; perhaps some customization (specifically, the instantiation >of an Ada GENERIC unit for the target elements). A major rewrite would be >excluded frp I should hope that simply copying source code is not what we consider to be "code reuse." As I've said before, "my code reuse tool of choice used to be the editor, until I inherited 60,000 lines of code from somebody else who thought the same way." Now my code reuse tool of choice is the linker. Simply duplicating source code and tweaking it to fit a new application oftentimes is not a good way to reuse code, as it opens up a debugging nightmare. (Oops, there's a bug. Fixed it. Now where are all those copies I made?) I would like to suggest that code reuse be defined at the object code level, in the form of libraries and header files (in the case of C and C++ and assembler), or generics in Ada. After all, reuse is precisely what these tools were invented for. The trick, then, is to figure out how to write libraries that are generic enough to be used by a wide variety of applications without being rewritten. Ada's generics provide a way of doing this, and pointers in other languages provide the opacity needed to hide the details on both sides of the interface. -- Paul M. Sander (408) 379-7000 | I just started here, and haven't thought of HaL Computer Systems | a new witty quotation yet. 1315 Dell Avenue | Campbell, CA 95008 USA |