Re: GIO API review



On Thu, 2007-12-13 at 19:19 +0100, Mikael Hallendal wrote:

> For example, if we plan to never use the GAsync infrastructure for  
> anything other than GIO there is a point to put it under the GIO  
> namespace as it shows where it belongs and what part of GLib it is  
> used for. It also means we can have GFooAsync later without the two  
> getting confused with each other. The same for GCancellable and  
> similar namespaces.

Eh, why would we not use these for anything other than GIO. They were
specifically designed to be generic and to be used by other APIs. 

Anything that has cancellable operations (things like libsoup or
whateveR) should use GCancellable. And GAsyncResult is a very powerful
pattern for doing async operation that all libraries with async
operations should take advantage of. And things like
GInputStream/GOutputStream are obviously useful for other things, like
loading pixbufs from any kind of source by implementing GInputStream.

> Without any namespace other than g_ it gives the idea that these  
> "frameworks" are used for more than one subsystem (at least to me).

Which is why they are good names, as this is the intention.

> GAsync, GCancellable, g_push, g_pop, g_loadable, g_simple are examples  
> of namespaces that would benefit from being under the GIO name spaced  
> as they are too generic by themselves.

A few of these are unnecessary taking up namespace, and I'm working on
fixing these.



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