Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!trantor.harris-atd.com!x102c!wdavis From: wdavis@x102c.harris-atd.com (davis william 26373) Newsgroups: comp.object Subject: Re: Redefining (used to be Void references) Message-ID: <4928@trantor.harris-atd.com> Date: 21 Nov 90 13:39:21 GMT References: <454@eiffel.UUCP> <1990Nov15.011702.25087@Neon.Stanford.EDU> <11113@pt.cs.cmu.edu> <1990Nov16.065609.15460@tukki.jyu.fi> <1990Nov17.174653.6291@ux1.cso.uiuc.edu> Sender: news@trantor.harris-atd.com Reply-To: wdavis@x102c.ess.harris.com (davis william 26373) Organization: Harris Corporation GSS, Melbourne, Florida Lines: 97 In article <1990Nov17.174653.6291@ux1.cso.uiuc.edu> johnson@cs.uiuc.EDU (Ralph Johnson) writes: > >Following the Scandianvian tradition, a program provides a model of >some system. When you find that you need to reuse just part of a class >then it means that your model was wrong. Instead of patching up the >code, you should fix your model. I do not agree that "the model was wrong". After you find that you "want to reuse" part of a class (not "need to resue" - there are always alternatives), how does that make what went before "wrong". Does the program you want to reuse parts of no longer work? Does it fail to perform its function in some way, now that you want to reuse part of it? If I have a single linked list implementation and find that I want to reuse parts of it (the link manipulation parts) in a double linked list, how does that make it any less "right" as a single linked list? If you find that the original model "was wrong" it must be because the model "was" not correct for the original problem or "is" not correct for what the original problem is now known to be. If you find the original model "is not correct for a new problem", then that is a different matter. In terms of software reuse, the "is vs. was" of "model wrong" is important because it determines what portions are to be reused and what portions can be easily reused. How does one draw the line between "new problem" and "new understanding of old problem"? I think that is the heart of the matter concerning ease of software reuse. > >Sometimes people argue against this point of view by saying that >it isn't possible to revise the class hierarchy because the source >code is not available, or they will say that this is going against >reusable software because instead of reusing a class we are revising >a class. Naturally, I disagree strongly with these points of view. I disagree with the first because that is just a language specific limitation. In theory, why can't object modules come with sufficient information to provide for "reuse". Indeed, if an object module can be used "only once", then how do we build multiple programs from it. Linking is only a small, albeit important, amount of reuse. The linker question has been described sufficiently in other postings but I have not seen a good solution proposed yet. Is there one that someone has already researched? >The first point is just a good reason why source should always be >avaliable, The first is also a good reason why more information is needed in an object module. Why should I be forced to go back to source to reuse things? Even when the source is available, why recompile? >and the second shows that wrong definitions of software >reuse are being applied. I agree. > If you believe that the main purpose of a >program is as a model of a system, and that it is just as important >for a program to be a way of communicating between people as it is >for it to be a way of communicating with machines, then changing the >model is absolutely necessary when it is shown to be inadequate. I agree the main purpose of a program is as a model of a system. (Actually a program is a model of a design and a design is a model of a system - different types of models). But the program exists because the model serves some purpose (achieves some result). So, the reason for the model determines the detail and biases in the model. Thus, there can be two different models of the same system for two different purposes. Neither is inherently right or wrong - the correct new of the model depends on the reason for the model. I agree it is important (maybe just as) for a program to be a way of communicating between people. But, as I have indicated already, I do not agree that the model must be changed. Indeed, I would say a new model is necessary when a given model is shown to be inadequate in a new domain. Then there will be multiple models in different domains. I think the big question of reuse is: How does one build a model in a way that allows maximum reuse of the parts of the model? This has large implications when you consider that a program and a design are both models. > >Ralph Johnson -- University of Illinois at Urbana-Champaign Bill Davis Harris GISD wdavis@x102c.ess.harris.com Disclaimer: I am not an official. So, these are not official views of any person or entity.