Re: API changes



On Fri, 2006-08-04 at 00:47 +0200, Philip Van Hoof wrote:
> - Finding another way to detect whether a type is an interface
>   and fix the python bindings generator this way (this is hard)

h2def looks at the type of the first member of the class struct to
determine the parent type. If that type is GTypeInterface, then the type
is obviously an interface.

I think that should work in every case where you don't have interfaces
derived from other interfaces, which (unless you're doing funky things)
is basically the same as using g_type_interface_add_prerequisite.


> - In my opinion it should be clear from the type name that it's
>   an interface. The fact that it's an interface shouldn't be
>   hidden from the developer. Why should it be?

Playing the devil's advocate, you could also argue that they shouldn't
need to be constantly hit over the head with the fact either.

Anyone that is only using it (as opposed to implementing it) probably
doesn't care whether it's an interface, an (abstract) class or anything
else. The only time they would actually care is when they want to create
one, and so know about a specific implementation or use the factory.

So not having Iface on the end of interfaces would save them having to
remember which types are classes (and so don't have them) and which are
interfaces (and so do).


Cheers,

James "Doc" Livingston
-- 
"Dealing with your sanity is a job for close-quarters weaponry."
    -- AdB in the monastry




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