Re: Introspection API

Robert Collins <[email protected]> Mon, 28 Feb 2005 21:41:37 +1100
Newsgroups gmane.comp.gnome.language-bindings,gmane.comp.gnome.gtk+.devel.general
Message-ID <1109587297.19136.31.camel@localhost>
On Mon, 2005-02-28 at 17:38 +0800, James Henstridge wrote:
>Havoc Pennington wrote:
>

>>XML is a crappy programming language. It's just a lot more convenient to
>>write code as code.
>>  
>>
>At the same time, C header files are missing a lot of the information 
>you'd want to include in the metadata.  You'll either end up with a lot 
>of ugly comments in the header (for an extreme case, look at something 
>like librpm's headers ...), or have the information separate from the 
>definitions (which can result on them becoming out of date).
>
>Having the C header files generated from a file written in some IDL that 
>can represent all the metadata would mean that the C header only need 
>include things relevant to C, and be fairly clean.

Let me add in that the portions of the C headers that are interesting
for introspection are not the bits that are really 'code'. #define
statements, C binding shortcuts - sure write those in C. But any non C
languages that publish their API via this introspection mechanism will
also need to do something->XML - so starting in XML makes a lot of sense
to me, then build XML->C, ->C++ ->python etc.

Cheers,
Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.

_______________________________________________
language-bindings mailing list  [email protected]
http://mail.gnome.org/mailman/listinfo/language-bindings
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQBCIvVgM4BfeEKYx2ERAhrDAKCz/N3pBZKaDbDt+8VsHJqRgdD/PwCdFJFj
x+hLEERmxz9Przh3VMB4/fY=
=R9DL
-----END PGP SIGNATURE-----