Re: Exporting the Gtk+ object system to interpreters



On Fri, 25 Dec 1998, Kenneth Albanowski wrote:

> On Sun, 13 Dec 1998, Tim Janik wrote:
> 
> > please read the C comments below more carefully. default handlers need to be
> > setup in class_init() functions and from then on are considered static data.
> > we shouldn't break that convention, not even for interpreter bindings, i
> > couldn't even come up with a reason why you'd want to subsequently
> > change default handlers. thus, the data argument does not need a destroy
> > notifier.
> 
> >From my viewpoint, this is a matter of semantics and/or convenience: in a
> more dynamic language, we may not be following the exact path that the
> creation of a C/Gtk widget follows, complete with knowing the exact set of
> default handlers during the creation phase.
> 
> The destroy handler is merely a matter of long-term convenience: without
> an individual destroy handler, bindings will leak and need to be slightly
> redesigned when either default handlers _can_ be changed, or classes can
> be destroyed. You might as well put the destroy handler in now, and be
> done with it. 
> 
> Neither of these are crucial, they are just generalizations. (Which
> usually lead to _less_ code and overhead in the binding, it seems).
> 

in my recent mail to marius, i tried to outline why default handlers
will never be resetable so there's no reason to worry about destroy
notification for that case.
destruction of classes is indeed a valid concern, but the chance that
gtk will ever implement class destruction is less than extremely unlikely.
in another project i'm working on, i'm using a type system that comes
pretty close to gtk's on some items, since we are using .so plugins there,
which may introduce new types, we had to implement automated class destruction.
the changes involved to get class destruction going are within a reasonable
amount for a single program, but we could never get that going for gtk's
existing code base.

> 
> Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
> 

---
ciaoTJ



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