Re: Introspection



Dnia 10-01-2005, pon o godzinie 23:59 -0500, muppet napisał:
> On Jan 10, 2005, at 11:12 PM, Maciej Katafiasz wrote:
> 
> >> ... In any case, there should
> >>   probably be a way to find out the struct offsets, so that
> >>   language bindings don't have to implement the struct layout
> >>   calculations themselves.
> >
> > Bindings are supposed to use libffi anyway.
> 
> i didn't know i was *supposed* to have used libffi.  ;-)

Aaah, I was unclear here. "Generic bindings for fully introspectable
GObject will most probably be supposed to use libffi anyway" was what 
I meant to say. That's the conclusion after discussing with several
people, since we will need to at least provide C-callable thunks that
will marshall vmethods invocations to language runtime.

> > It's quite probable that they will have to do things like generating  
> > thunks/marshallers for vmethods on the fly anyway, so that's an  
> > already existing dependency, and I guess libffi is supposed to do  
> > things like creating structs layout on demand, right?
> 
> libffi isn't a dependency for either gtk2-perl or (afaik) pygtk.

Yeah, see above.

> >> * Should documentation be included in the metadata ?
> >
> > YES! Everyone loves docstrings.
> 
> ... so long as you have gobs of ram for the bloat they will add to the  
> binary blob.

If you keep them in const data segment, why would they bother you? And
even if not, it should still be possible to arrange it so that they're
loaded on-demand. After all, people are using Python and Lisp for quite
some time now, and they sport docstrings by default.

> >> * Should type information for parametrized container types
> >>   be provided on the gobject level, or should we do a simple
> >>   ad-hoc description for such types ?
> >
> > How would such ad-hoc description work? Hardcoded knowledge about  
> > GList,
> > GHashTable, etc. into each binding?
> 
> I would think something like "GList of GObject" or "GHashTable string  
> to integer" would be quite sufficient.  Generically, "GList of  
> <typename>", "GSList of <typename>", "GHashTable <key typename> to  
> <value typename>".

That's what I meant, I guess.

Cheers,
Maciej

-- 
Maciej Katafiasz <ml mathrick org>




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