Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!ut-emx!plyon From: plyon@ut-emx.uucp (Paul Lyon) Newsgroups: comp.object Subject: Re: Seeking Object Oriented Design Training Keywords: Object Oriented Design Training Message-ID: <51327@ut-emx.uucp> Date: 27 Jun 91 18:24:56 GMT References: <13457@sybase.sybase.com> <1991Jun24.190417.10440@netcom.COM> <4203@ssc-bee.ssc-vax.UUCP> Organization: The University of Texas at Austin; Austin, Texas Lines: 46 In article <4203@ssc-bee.ssc-vax.UUCP> dmg@ssc-vax.UUCP (David M Geary) writes: > Therefore, due to lack of tools, or lack of compilers, many who > would probably like to be programming in C++ are stuck doing C. > > However, this does not mean that one cannot apply the principles > of OOP when writing C. There are many things one can do in C to > achieve a high degree of modularity and reusability, however, many > C programmers are not well versed in this area. > > For those who would desire to become better versed, here a couple of references that could help: John W.L. Ogilvie, _Advanced C Struct Programming: Data Structure Design & Implementation in C_, Wiley & Sons, New York, 1990. This has useful examples, together with a running discussion on designing "abstract data types" that is oriented towards practical work (and seems clearly to be based on practical experience). C programmers trying to convert to C++ might also benefit from this book, not so much for guidance on programming in C++ (for there is no discussion of that therein), but more for the spirit of the thing: the idea being that once one sees how to design with abstract data types in C, one will be better prepared for programming in a C based language with support for abstract data types. Roger Sessions, _Reusable Data Structures for C_, Prentice-Hall Englewood Cliffs, 1989. This book has some instructive examples about how one might go about providing a measure of encapsulation within C for basic data structures such as linked lists, stacks, queues, and binary trees. [Sessions calls the reusable code modules that he presents "packages" (Hmm.., and what other language has he been using? :-)]. A nice feature of this book is the effort Sessions makes, in his "Performance" chapter, to speak to the concerns C programmers might have about efficiency, since his approach requires smallish functions (with a view towards making it easier to try to decide correctness). [His reply to such worries is a reasonable elaboration of "make it work before you make it fast".] Paul Lyon