Abstract Data Types in C

david wald wald-david at CS.YALE.EDU
Fri Oct 21 14:43:10 AEST 1988


In article <116 at capshaw.UUCP> sdc at 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 at yale.UUCP
						       waldave at yalevm.bitnet
============================================================================



More information about the Comp.lang.c mailing list