Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!metzger From: metzger@convex.com (Robert Metzger) Newsgroups: comp.software-eng Subject: Re: OO Design with "C" - Do we still get benefits Keywords: object-oriented, C Message-ID: <1991Mar22.231807.5210@convex.com> Date: 22 Mar 91 23:18:07 GMT References: <1991Mar22.212448.21375@news.larc.nasa.gov> Sender: news@convex.com (news access account) Organization: Convex Computer Corporation, Richardson, Tx. Lines: 38 Nntp-Posting-Host: bach.convex.com In article <1991Mar22.212448.21375@news.larc.nasa.gov> smd@rehder.larc.nasa.gov (Steve Dahmen) writes: >Would anyone here mind commenting on the use of object oriented >analysis and design principles with the "C" language? > >From my own limited, but growing, understanding of OOD, it seems the >concepts itself natually promote good programming practices resulting >in lower maintenance costs. Our project seems to invite an OO >approach because of the data organization. > >SO, is there a tragic flaw in my assumption that the use of OOD in >analysis and design, but implementing the project in "C" will result >in "better" code than using the old functional decomposition methods? When CONVEX began development of the Application Compiler (new product that performs interprocedural optimization on applications written in FORTRAN and or C) we decided that we wanted to use an object oriented approach. At that time, all that was available to us was AT&T C++ V1.2, which had numerous bugs and missing features. So we designed the whole system using objects, and then implemented in C mimicking C++ as we could. We certainly benefitted from designing the system in terms of objects, and the data abstractions we implemented by hand were helpful. We completely re-implemented the internals of some objects with minimal pain, and we added new sub-classes without much problem either. If we were starting the project today, we would use C++ as an implementation language. Other development projects which started after ours have used it successfully to build large system software products. AT&T C++ V2.1 is a much better piece of software than 1.2 was, and there are limits to what you can do without assistance from the language. So, yes, you will get some benefit from OOD and a C implementation, but I think you should reconsider using C++. -- Robert Metzger CONVEX Computer Corp. Richardson, Texas Generic Disclaimer: I write software, not CONVEX Corporate Policies. "The only legitimate function of government is to protect its citizens from harm or property loss by violence, stealth, or fraud. All else is tyranny."