Re: Plans for 2.8 - GNOME Managed Language Services?



On 27/03/04 00:48, Murray Cumming wrote:

On Fri, 2004-03-26 at 16:55, Havoc Pennington wrote:
My suggestion if we want to do something in 2.8 and we can't get people
behind "open source Java subset" is:
- make full introspection data on the GTK+ API more formally part of GTK+, so language bindings aren't maintaining this themselves

I'm not sure what you mean here? Do you just mean GObject properties?
Probably introspection of everything, including methods/functions. Currently the glib object system only gives you:

   * a simple type system able to express various number formats,
     enumerations, flag sets, strings, structures with value semantics
     (boxed types), and objects (GObject).  It also contains some less
     portable types such as "pointer", which can be used by C code to
     escape its limitations.
   * introspection of the class heirarchy of GObject.
   * what interfaces each class implements.
   * introspection of signals (aka. events in other systems)
   * introspection of properties
   * generic marshalling of signal emissions via g_signal_emitv()
   * ability to connect handlers to arbitrary signals
   * generic getting and setting of properties with
     g_object_set_property() and g_object_get_property()

Things that are lacking include:

   * Introspection of all methods of an object class.  This involves
     their names, types of arguments and return value, etc.  Should be
     able to describe the majority of current methods in GTK and
     various bits of the Gnome platform.
   * some way to programatically invoke these methods.
   * Something similar for functions not connected to objects.

The idea here being that you should be able to write a fixed amount of code to bind _everything_. For a dynamic language, they might construct classes at runtime. For a static language like C++, it could be used by a code generator. For something like Mono, some kind of bridge could be implemented.

The other useful part would be some way for language bindings to extend classes in such a way that they could be used from C code. This is potentially a lot more difficult though, and probably couldn't be bolted onto the side of our current framework as easily.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





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