Re: [gnet-devel] Include file 'namespace'



On Sun, 2008-09-14 at 18:30 +0100, Matt Bucknall wrote:

Hi Matt,

> I'm contemplating using GNet on a fairly major project at work, however 
> I am a little concerned regarding how GNet's include files are named and 
> organized.
> 
> When installed, all include files (assuming version 2.0) are installed 
> at $(prefix)/gnet-2.0. Apart from gnet.h, none of the include files use 
> any sort of naming convention to disambiguate them from unrelated 
> include files which may be in the compiler's include path (and thus 
> could cause conflicts).
> 
> Would it not be wise to either take the approach Glib takes where all 
> include files except the main one (glib.h) are included in a 
> sub-directory (e.g. glib/gtypes.h) or at least prefix all the include 
> files with gnet-* or something?
> 
> I appreciate that changing the organization of include files is going to 
> break the API, but it would not be difficult to deprecate the current 
> scheme and come up with a newer, safer scheme that can co-exist with the 
> original for a while.

I think you're right - the way the includes are organised currently is
far from ideal, especially given that the include files are not
prefixed, but I don't think it's worth changing that now. GNet is
basically in maintenance mode, so breaking API just for this is not
really an option. Most applications and libs have probably never noticed
because they prefix their own source files.

 Cheers
  -Tim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]