Re: instance-private-data issue



On 5 Aug 2003, Owen Taylor wrote:

> On Tue, 2003-08-05 at 04:00, Mathieu Lacage wrote:

> > > The other advantage of the "bloat GTypeInstance" approach is that
> > > this may not be the only problem of the form "G_TYPE_FROM_INSTANCE()
> > > produces unexpected results in instance_init()".
> >
> > My personal god (namely Darin) would laugh at me if I tried to justify a
> > patch with a sentence including the word "may".
>
> I, or you, can easily construct *artificial* examples of this problem.
> I don't think anybody expects the current behavior. I think most
> people would be shocked at what result you'd get if you put

the current bhaviour is indeed very expected, it's even documented in
  http://developer.gnome.org/doc/API/2.0/gobject/gobject-GType.html#GInstanceInitFunc

and FYI, i dug out up the original email that motivates
the way we initialize classes:
  http://www.gtk.org/~timj/init-type-bug-1998.email


>  g_print ("Creating a new widget of type %s\n",
> g_type_name_from_instance (widget));
>
> into gtk_widget_init(). But I don't know of any real examples where it
> is a problem other than than this one, so I said "may".
>
> When considering a couple of courses of action, considering all possible
> upsides and downsides is important. Sometimes this upsides and
> downsides involve a bug in bugzilla that someone encountered
> last week. Sometimes they involve thinking about bugs that someone
> *might* encounter next week. The first get more weight, but
> ignoring the second is silly.

we have our class initialization in place now for more than 5 years without
encountering any major problem. furthermore, we mimick the way other major
languages initialize their classes.
so at this point, i don't think it makes much sense to speculate about
future problems with the way we do class initialization and make it
sound like it's going to fall apart in the next few minutes.

>
> Regards,
> 						Owen
>

---
ciaoTJ





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