Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!rutgers!bellcore!tness7!texbell!killer!pollux!dalsqnt!rpp386!jfh From: jfh@rpp386.Dallas.TX.US (The Beach Bum) Newsgroups: comp.lang.c Subject: Re: Abstract Data Types in C Summary: you have to excersize self-discipline for it to work. Message-ID: <7951@rpp386.Dallas.TX.US> Date: 16 Oct 88 04:43:47 GMT References: <116@capshaw.UUCP> Reply-To: jfh@rpp386.Dallas.TX.US (The Beach Bum) Organization: River Parishes Programming, Dallas TX Lines: 25 In article <116@capshaw.UUCP> sdc@capshaw.UUCP (Dan Capshaw) writes: >Is anyone out there using ADTs in C? If so, am I missing something >here? And finally, if ADTs are not as I have described them, what >are they, and how can they be used in C (if in fact they should be used >in C)? Yes, on very large and hairy projects they are a must. What you and your friend are probably missing is the need to discipline yourselves to do the hard work and keep the data type abstract. An example of how this might happen is if you have a routine CreateObject(), which creates and initializes the object, but then you use free() to dispose of the item rather than having yet another routine, DestroyObject() which itself may only be a call to free(). You have to not know the details of the implementation, and what details you are permitted to know must be very well documented. This is why documentation is so very important. It defines what you are permitted to use reliably. -- John F. Haugh II +----Make believe quote of the week---- VoiceNet: (214) 250-3311 Data: -6272 | Nancy Reagan on Richard Stallman: InterNet: jfh@rpp386.Dallas.TX.US | "Just say `Gno'" UucpNet : !killer!rpp386!jfh +--------------------------------------