Re: Introspection API



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>.

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]