This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Register group proposal


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]