From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public From: rmartin@oma.com (Robert C. Martin) Subject: Re: What is wrong with OO ? Date: 1996/12/31 Message-ID: #1/1 X-Deja-AN: 206954750 references: <5aa73v$p14@news3.digex.net> <5aae85$ad8@masters0.InterNex.Net> organization: Object Mentor Inc. newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1996-12-31T00:00:00+00:00 List-Id: In article <5aae85$ad8@masters0.InterNex.Net>, clovis@wartech.com wrote: > In <5aa73v$p14@news3.digex.net>, ell@access5.digex.net (Ell) writes: > > >I find the key aspects of C++ to be within the parameters of the > >_progressive_ OO paradigm and practice. In many ways C++ has led and > >still leads in the expression and implementation of many significantly > >useful OO concepts. > > I concur with this, but think it does not go far enough. > > ANY language, up to and including direct object code, is just fine. > > The real problem is personal discipline -- designing completely before coding. > > Wirth's paradigm is STILL at the basis of all good design and coding practice. > > Data Structures + Algorithms = Programs. > > This whole thread somehow ignors that basic reality. The most aggressive > paradigm still respects Wirth's basic rule. One MUST have structured data (otherwise > exact access is impossible, and all algorithms produce garbage). One MUST have > algorithms -- otherwise, the data is nothing more than an electronic, fixed book > which one can't even access reliably. > > Any language which provides both these features is sufficient. > > All we're really discussing is HOW to provide data structures and algorithms. > > There isn't a real paradigm shift until the basic model itself changes. All we're > really talking about is how to represent the data structures and algorithms, that is, > how to go about implementing them. The paradigm shift in OO comes about because of some very different separation strategies. Prior to OO, data was accessed from data structures. Any algorithm that needed that data had knowledge of the data structures. In OO, this changes. Some algorithms are closely associated with a data structure and have intimate knowledge of it. However, other algorithms, that use the data within the data structure have no knowledge of the data structure. They are isolated from the data through abstract interfaces. When the data structure changes, these algorithms do not change. Moreover, these algorithms can make use of many different kinds of data structures without knowing it. Thus there is a fundemental change. We still create data structures, and we still create algorithms. But in OO we also create interfaces that separate some algorithms from some data structures. Then we must decide which algorithms know about which data structures, and which should be kept separate. It is that decision that is called OOD. If you don't believe that this is a fundemental paradigm shift, then consider that this simple trick of separating algorithms and data structures creates an equation that is quite different from Wirth's: program = Interfaces(algorithms,data_structures) Where the algorithms and data_structures are independent variables that have no knowledge of each other, and the interfaces are the mapping functions that bind the two together to create certain programs. -- Robert C. Martin | Design Consulting | Training courses offered: Object Mentor | rmartin@oma.com | Object Oriented Design 14619 N Somerset Cr | Tel: (847) 918-1004 | C++ Green Oaks IL 60048 | Fax: (847) 918-1023 | http://www.oma.com "One of the great commandments of science is: 'Mistrust arguments from authority.'" -- Carl Sagan