This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: Register group proposal
- To: Dautrevaux at microprocess dot com
- Subject: RE: Register group proposal
- From: Nick Duffek <nsd at redhat dot com>
- Date: Sat, 24 Feb 2001 18:51:51 -0500
- CC: gdb at sources dot redhat dot com, insight at sources dot redhat dot com
- References: <17B78BDF120BD411B70100500422FC6309E214@IIS000>
On 23-Feb-2001, Bernard Dautrevaux wrote:
>Perhaps for avoiding an unneeded dependency, that would trigger superfluous
>recompiles of users of "abc.h" that do not need "xyz.h" if "xyz.h" is
>modified?
I agree that's a pain. But prohibiting typedefs only avoids a small
subset of superfluous recompiles. For example, changing a single macro in
gdbarch.h causes a massive rebuild.
Eventually, GCC probably will support header file compilation, which
probably will lead to fully-accurate dependency generation. This will
eliminate superfluous recompiles.
In the meantime, the problem diminishes as hardware speedups outpace GCC
complexity.
However, humans won't ever get better at writing maintainable code or
understanding existing code. Typedefs help us achieve both of those
goals.
>Another problem may be seen as "name space pollution": If you don't mind
>about "xyz.h" why should you be prevented using some identifiers colliding
>with the private parts of it?
Regardless of whether we nest include files, global namespace clashes are
(1) a concern that is
(2) avoidable by using naming conventions minimizing the likelihood of
clashes.
Nick