Structure Comparison (ADA vs C) - (nf)

grunwald at uiuccsb.UUCP grunwald at uiuccsb.UUCP
Tue Nov 1 13:37:00 AEST 1983

uiuccsb!grunwald    Oct 30 14:57:00 1983

bjb: Most of the nice features of Ada having little to do with code generation
at all -- most of them are features which allow you to obtain more information
about a type than in C. Additionally, the concept of allowing you to specify a
``generic type'' is very powerful and actually allows you to save code.
   For instance, in Pascal, if one has two types A and B, and wants to make
stacks of 100 elements each using these types, you need to write separate
routines for "pushA", "pushB", etc.
   In Ada, it should be possible to write a compiler which does not expressly
need to provide separate routines for each type. The code within a generic
type may be able to be made to share routines which do not reference any
specific feature of the type (e.g. size, etc).

The data type definitions of Ada are, while not exactly clean, very well done
and they would allow you to avoid most of the explicit kludges that one does
in Pascal and most of the implicit kludges that go on in C.

More information about the Comp.lang.c mailing list