This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Projects for beginners
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Re: Projects for beginners
- From: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Date: Sat, 3 Feb 2001 02:38:53 +1100
- Cc: gcc at gcc dot gnu dot org
- References: <10102021131.AA10015@vlsi1.ultra.nyu.edu>
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.