SAX/C++ vs. SAX2
Ray Whitmer
ray at xmission.com
Mon Dec 6 14:40:21 GMT 1999
Lars Marius Garshol wrote:
> * Vilya Harvey
> |
> | Just a thought: why not take a leaf out of the DOM's book and write
> | the canonical version of the SAX interfaces in a language-neutral
> | format like IDL?
>
> This may sound like a good idea, but it has its drawbacks in that one
> is immediately forced into a lowest common denominator design where it
> is impossible to make use of the features that really make each
> language what they are.
Just to clarify, if IDL stub generators were being used with the DOM spec, this would be
true, which is the normal way to use IDL. This is not how IDL is being used by the DOM
specification. It simply forms a neutral starting point.
[...]
> Nor are language naming conventions respected. (startElement should
> really be startElement (in Java), start_element (in C++, Python, IDL)
> and start-element (in Common Lisp/Scheme) and there may even be more
> variations.
I don't understand your need to promote arbitrary style differences which have nothing to do
with the language, which your example here seems to demonstrate.
I find the statement that startElement should be start_element in C++ and IDL far from
obvious, although it may need to be true now for Legacy reasons. The mixed casing that Java
uses was borrowed from C++ specs, and is common there.
> As a general reference and statement of intent it might have some
> value, but I really think translation should be done by humans. The
> main advantage feature of IDL, cross-process and cross-language
> interoperability, is not really all that valuable for SAX anyway.
I agree, and this is the philosophy behind the DOM's use of IDL -- let each binding adapt it
as necessary (into a single spec for that binding, not in as many different ways as desired).
The disadvantages using IDL is that people will try to use it with an IDL compiler, and/or
neglect to publish single human-derived bindings for specific languages so variety of
mutations could spring up for a particular language, as has happened in certain cases with
DOM.
Ray Whitmer
ray at xmission.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list