Path: utzoo!attcan!uunet!mfci!yale!wald-david From: wald-david@CS.YALE.EDU (david wald) Newsgroups: comp.lang.c Subject: Re: Abstract Data Types in C Keywords: Abstract Data Types ADT modules Message-ID: <40880@yale-celray.yale.UUCP> Date: 21 Oct 88 04:43:10 GMT References: <116@capshaw.UUCP> Sender: root@yale.UUCP Reply-To: wald-david@CS.YALE.EDU (david wald) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 27 In article <116@capshaw.UUCP> sdc@capshaw.UUCP (Dan Capshaw) writes: >A friend that does a lot of program development in PASCAL has found that >using Abstract Data Types (ADTs) significantly increases his >productivity by minimizing his debugging time... > >One reason my friend doesn't like C is because he doesn't feel ADTs can >be used effectively in C. But to me, it seems like he is just >describing standard function calls where the interface is defined but >how the function performs its job may not be. So...I don't see the >advantage of ADTs and how they are superior to the structured >programming techniques that I have been using for years. > >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, you can certainly use ADT's in C. On the other hand, you and/or your friend might want to take a look at C++, which provides fairly decent support for creating new data types and hiding their internal structures. ============================================================================ David Wald wald-david@yale.UUCP waldave@yalevm.bitnet ============================================================================