[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Renaming
From: |
John Darrington |
Subject: |
Re: Renaming |
Date: |
Wed, 1 Mar 2006 06:23:21 +0800 |
User-agent: |
Mutt/1.5.9i |
On Tue, Feb 28, 2006 at 06:19:15AM -0800, Ben Pfaff wrote:
John Darrington <address@hidden> writes:
> On Mon, Feb 27, 2006 at 06:22:19PM -0800, Ben Pfaff wrote:
>
> > file-handle-def.c
> > file-handle-def.h
>
> => file-handle.[ch] I think.
>
> Won't this conflict with file-handle.q from src/language/data-io ?
Won't being in a different directory put it in a different
namespace?
In so far as the *.c files are concerned, yes. The *.h files are a
different story; Currently, each directory has its own set of -I flags
in its AM_CPPFLAGS. If (as is the case with src/language/data-io)
this set includes both locations, then which header gets included with
#include "file-handle.h" ???
Perhaps (as we discussed before) we should just make all the
directories have a common set of includes:
-I $(top_srcdir)/src and -I $(top_srcdir)/lib
then the problem goes away, because one simply writes
#include <data/file-handle.h>
#include <language/data-io/file-handle.h>
or just
#include "file-handle.h"
if refering to the current directory.
I think there are pros and cons to both approaches:
Advantages Disadvantages
-I The integrity of the Namespace clashes.
dependencies is enforced.
Moving files between dirs
is easy.
#include Unambiguous. Potentionally long #includes.
Encourages promiscuous
#inclusion of inappropriate
files.
Moving files between
directories involves changing
*every* #include which
references them.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.
signature.asc
Description: Digital signature
- Re: Renaming, Ben Pfaff, 2006/03/01
- Re: Renaming, John Darrington, 2006/03/01
- Re: Renaming, Ben Pfaff, 2006/03/01
- Re: Renaming,
John Darrington <=
- Re: Renaming, John Darrington, 2006/03/04
- Re: Renaming, Ben Pfaff, 2006/03/02
- Re: Renaming, John Darrington, 2006/03/02
- Re: Renaming, Ben Pfaff, 2006/03/02
- Yet another tarball, John Darrington, 2006/03/04
- Re: Yet another tarball, Ben Pfaff, 2006/03/03
Re: Renaming, Ben Pfaff, 2006/03/04