Re: Steps to get to GTK+ 3.0



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.
- 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.

-- 
Regards,
Martyn


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