Projects for beginners
Fergus Henderson
fjh@cs.mu.oz.au
Fri Feb 2 07:39:00 GMT 2001
On 10-Mar-2037, Richard Kenner, GNU C Maintainer <kenner@vlsi1.ultra.nyu.edu> wrote:
> But the dependencies may change even if you merely *add* something,
> rather than changing the specification of any of the existing stuff.
>
> The point is that such additions should be disallowed.
I think such a policy would be difficult to abide by.
> We should have strict heirarchy of what's to be included where that
> both reflects a logical structure and makes it easy to use the files.
Suppose I have an abstract data type, for example arbitrary precision
integers. Suppose that the implementation of this ADT is hidden,
i.e. the header file contains only a struct declararation,
not a struct definition, and that it doesn't depend on any other
headers.
Now suppose I want to add a new routine which prints an integer to a
file. This routine takes a parameter of type `FILE *', so this
header now has a dependency on <stdio.h>.
Your suggested policy would forbid me from adding this routine to the
header file. What should I do instead?
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: < http://www.cs.mu.oz.au/~fjh > | -- the last words of T. S. Garp.
More information about the Gcc
mailing list