This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Feature idea for gcc
- From: dewar at gnat dot com (Robert Dewar)
- To: gcc at gcc dot gnu dot org, maschaffner at gmx dot ch
- Date: Fri, 29 Nov 2002 19:56:21 -0500 (EST)
- Subject: Re: Feature idea for gcc
> The extension would allow one to write `#use "foo.c"' instead of `#include
> "foo.h"'. If the preprocessor would hit such a directive, it would call an
> external program which would create an appropriate header file for the source
> file `foo.c', and include it. This would free the programmer from the task of
> writing a header file for every source file.
it is interesting to see C programmers regard this as some kind of annoying
chore, but indeed this seems a common attitude. I must say I prefer to see
C written more in the Ada style of separating specification from
implementation, where the header acts as the spec, the the c file as the
implementation.