Re: Steps to get to GTK+ 3.0



On Mon, 2008-06-09 at 13:30 +0100, Martyn Russell wrote:
> Murray Cumming wrote:
> > On Tue, 2008-06-03 at 13:34 +0200, Kristian Rietveld wrote:
> > [snip]
> >> We should start to enforce the usage of single header includes and not
> >> make this optional.  Mitch has been working on this and most is already in
> >> place in SVN trunk.
> > [snip]
> > 
> > What's the advantage of this? Has this been a real problem for GTK+ so
> > far?
> 
> The main advantages I can think of are:
> 
> - When you add/remove/rename header files, you don't break all
> applications which directly included them.

This seems like the only change. The rest is just about the convenience
of using just gtk.h, which already exists.

Forcing use of single include file does indeed seem useful for API
stability, though I wonder if it's worth forcing people to include
everything. Clearly not all people want to include just gtk.h, or they'd
all be doing it already.

> - Application developers don't have to worry about which files
> specifically they need to include, they just include the project header
> file. This makes using GTK+ a lot easier for beginners.
> - If you stop using a widget in a source file but forget to remove the
> include statement, it leaves cruft in applications.
> 
> I don't know if it is a problem. But GLib does it and we should be
> consistent one way or the other.
> 
> > Many people (particularly C++ developers) like to reduce pollution of
> > the global namespace by including as few headers as reasonably possible.
> > That can also reduce compile times (particularly for C++ developers).
> 
> I prefer one header. Like #include <glib.h>
> 
> I know it affects compile time, but it simplifies things for application
> developers and makes maintenance much easier and I consider that much
> more important.
> 
-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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