Re: Minutes of the GTK+ Team Meeting - 2008-09-23



On Thu, 2008-09-25 at 10:35 +0200, Alexander Larsson wrote:

> > I think removing the classes but keep gtk_hbox_new/gtk_vbox_new that  
> > simply creates a GtkBox with the correct orientation is the right  
> > approach here.
> 
> Yeah. I agree. Why are these bad? They are just helper functions (that
> happens to be constructors). They don't hurt, and imho they make the
> code more readable (by virtue of being less verbose).

I think removing the GTypes and leaving the ctors would be bad.  Calling
gtk_hbox_new and getting an instance of GTK_TYPE_BOX would be an
inconsistency in the semantics of the type system.  It could add
complexity to type mapping for language bindings as well.

If this H/V deprecation occurs, and the GTypes are removed, I would
probably provide managed implementations of all the classes and register
GTypes for them for Gtk#.  Especially considering that it would be a 2
or 3 line class in C#.  Since many users are going to be doing similar
things, why not leave the types even if you are looking to reduce the
amount of layout and drawing code.  The types would essentially be
boilerplate, so it's not like they are going to be a maintenance issue.

If the motivation for removing the types is that, "things aren't as
beautiful as they could be" then that argument doesn't really outweigh
the pain of porting existing code.  Especially when the cost of
supporting existing code is so low.  

-- 
Mike Kestner <mkestner gmail com>



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