Re: Introspection API



On Fri, 2005-02-25 at 17:58 +0100, Maciej Katafiasz wrote:

>
>> > IMHO, strings are not good enough. Annotations should be real type,
>> > similar to objects (but simpler), with parameters and inheritance.
>> 
>> Well, I'm not sure this is really worth it. Do you have any concrete use
>> cases in mind, or is this just general nonsense, 'but Java5 has it'
>> stuff ?
>
>Some major use cases:
>
>1) Serialisation (ie, autogeneration of DBUS bindings for GObjects)

Can you be clearer here?  Serialization of what exactly?  The whole idea
with GObject introspection (excluding annotations) by the way is that
autogeneration of D-BUS bindings is much cleaner and easier.

>2) Unit tests (you can mark functions that are tests to be run, and
>expected outcome)

I don't see why you need anything other than strings for this; just have
a standard annotation named org.gtk.GLib.Test with a value "true".

>3) Annotations for language bindings, to tweak some things which were
>previously done by overriding .defs (of course, the ideal case is when
>everything works automagically, but it's imperfect world, and we should
>be prepared)

This might be a better argument, but someone familiar with language
bindings would have to give specific examples of data that couldn't be
fairly cleanly mapped to a string.

>4) Custom, app-specific tagging of stuff. It's not absolutely necessary
>when we have g_object_set_data(), but still useful to be able to tag
>entire type.

Can you give an example of when you'd want to do this?

Attachment: signature.asc
Description: This is a digitally signed message part



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