[Xcb] xml description: removal of <op> fields

Jamey Sharp jamey at minilop.net
Tue Feb 20 17:52:41 PST 2007


On Tue, Feb 20, 2007 at 11:12:15PM +0100, Thomas Hunger wrote:
> in the xml-description there are list fields ...
> with some expression to calculate the length:
> 
> This is very verbose and only sensible if other languages than c 
> implement the binary protocol.

That isn't the only reason to want the expressions in tree-form. For
example, I think whoever implements server-side XCB will effectively
want to do algebra on these expressions, inverting them to get the
original call parameters back from the wire protocol.

> I believe that most language bindings will wrap the existing c
> functions.

I believe that the most important feature of XML-XCB is that it be
usable by all sorts of innovative applications. For that purpose I want
the XML to be as descriptive as possible. I'm willing to accept a little
bit more difficulty in writing protocol descriptions in order to make it
possible to build cool new tools on this stuff.

That includes supporting those languages that *don't* simply wrap the C
functions. Reply handling especially is likely to be much more
sophisticated in higher-level languages than in C. The prototype Haskell
binding is one example where the binding needs to know a lot about the
wire protocol, even though it does use the C implementation for a
transport layer. I suspect bindings for scripting languages such as Perl
and Python will be best written in a similar manner, if they use the C
implementation at all.

However, please feel free to write a pre-processor that takes some
simpler syntax and outputs XML in the current format. If you do so, you
might consider not using XML as the input language at all: *all* of
XML-XCB is quite verbose. :-)

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070220/41ff467b/attachment.pgp


More information about the Xcb mailing list